int flag=fcntl(fd,F_GETFL,0); flag |= O_NONBLOCK; if(fcntl(fd,F_SETFL,flag) < 0){ perror("fcntl"); exit(1); }
管道 非阻塞 duxie
最新推荐文章于 2019-07-14 17:44:00 发布
int flag=fcntl(fd,F_GETFL,0); flag |= O_NONBLOCK; if(fcntl(fd,F_SETFL,flag) < 0){ perror("fcntl"); exit(1); }