`
fanrey
  • 浏览: 251918 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

write error: Bad file descriptor

 
阅读更多
int    pip[2];
pipe(pip);
fork();
/* parent process */
/* Close Read end of the pipe */
   close(pip[0]);

/* child process */
/* Close Write end of the pipe */
   close(pip[1]);


strace结果显示错把标准输出关掉了:
pipe([1, 11]) 
close(1)                                = 0
close(11)                               = 0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics