Bad file descriptor

后端 未结 3 861
旧时难觅i
旧时难觅i 2021-02-18 16:55

I\'m learning about file descriptors and I wrote this code:

#include 
#include 
#include 
#include          


        
3条回答
  •  执笔经年
    2021-02-18 16:56

    I think O_CREAT alone is not enough. Try adding O_WRONLY as flag to the open command.

提交回复
热议问题