|
|
发表于 2006-5-25 19:00:03
|
显示全部楼层
不知道这个是不是需要的
Post by Arthur.Echo
这个只是禁止了这一个进程写标准输出和标准出错,其他的不会有什么影响
Closing Standard File Descriptors
One of the last steps in setting up a daemon is closing out the standard file descriptors (STDIN, STDOUT, STDERR). Since a daemon cannot use the terminal, these file descriptors are redundant and a potential security hazard.
/* Close out the standard file descriptors */
close(STDIN_FILENO);
close(STDOUT_FILENO);
close(STDERR_FILENO); |
|