相关疑难解决方法(0)

在写作之前如何检查管道是否开启?

如果我将消息写入已关闭的管道,那么我的程序会崩溃

if (write(pipe, msg, strlen(msg)) == -1) {
    printf("Error occured when trying to write to the pipe\n");
}
Run Code Online (Sandbox Code Playgroud)

pipe在写信之前如何检查是否仍然打开?

c linux pipe

4
推荐指数
1
解决办法
5036
查看次数

标签 统计

c ×1

linux ×1

pipe ×1