水木社区手机版
首页
|版面-C程序设计语言(CProgramming)|
新版wap站已上线
返回
1/1
|
转到
主题:求助一个glibc相关的问题
30楼
|
emwanwei
|
2023-08-03 17:52:02
|
展开
是不是fork之后,在子进程需要把文件都关闭比较好?
https://github.com/austinsc/Poco/blob/master/Foundation/src/Process_UNIX.cpp#L200
// close all open file descriptors other than stdin, stdout, stderr
for (int i = 3; i < getdtablesize(); ++i)
close(i);
--
FROM 66.152.176.*
1/1
|
转到
选择讨论区
首页
|
分区
|
热推
BYR-Team
©
2010.
KBS Dev-Team
©
2011
登录完整版