`
fanrey
  • 浏览: 256543 次
  • 性别: 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
分享到:
评论

相关推荐

    golang bad file descriptor问题的解决方法

    fmt.Println(err) // 输出: write a.txt: bad file descriptor } } ``` 在这个例子中,使用`os.Open()`函数以默认的只读模式打开了文件`a.txt`。随后尝试向该文件写入数据时,程序抛出了`bad file descriptor`的...

    C2修复工具【银灿916】固件

    54="PM write image file error" 55="PM read capacity error" 56="PM set partition error" 57="PM read partition error" 58="PM read system descriptor error" 59="PM read...

    Bochs - The cross platform IA-32 (x86) emulator

    boot sector from file, volatile write support using hdimage redolog_t class, optional commit support on Bochs exit, save/restore file attributes, 1.44 MB floppy support, set file modification date/...

    BUS Hound

    write, and isochronous device performance  Captures device driver packets such as IRP’s  Filter what type of phases are captured  Run on an unlimited number of machines at the same ...

    The Indispensable PC Hardware Book - rar - part1. (1/7)

    Data bus and write data duplication. I/O address space and the peripherals. I/O addressing. I/O cycles. Registers. Registers overview. Segmenting. General purpose and segment registers. Flags....

    servlet2.4doc

    Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. -------------------------------------------------------------------------------- G ...

Global site tag (gtag.js) - Google Analytics