水木社区手机版
首页
|版面-C程序设计语言(CProgramming)|
新版wap站已上线
展开
|
楼主
|
同主题展开
|
溯源
|
返回
上一篇
|
下一篇
|
同主题上篇
|
同主题下篇
主题:Re: 求助一个glibc相关的问题
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.*
上一篇
|
下一篇
|
同主题上篇
|
同主题下篇
选择讨论区
首页
|
分区
|
热推
BYR-Team
©
2010.
KBS Dev-Team
©
2011
登录完整版