如果我将消息写入已关闭的管道,那么我的程序会崩溃
if (write(pipe, msg, strlen(msg)) == -1) { printf("Error occured when trying to write to the pipe\n"); }
pipe在写信之前如何检查是否仍然打开?
pipe
c linux pipe
c ×1
linux ×1
pipe ×1