fdc4a7b103
PR: ports/31352, ports/39018 Submitted by: Stanley.Hopcroft@IPAustralia.Gov.AU (via maintainer)
20 lines
512 B
Text
20 lines
512 B
Text
--- base/utils.c.orig Thu Feb 21 02:47:12 2002
|
|
+++ base/utils.c Tue Jun 11 09:21:53 2002
|
|
@@ -1884,6 +1884,17 @@
|
|
val|=FD_CLOEXEC;
|
|
fcntl(lockfile,F_SETFD,val);
|
|
|
|
+ /* close existing stdin, stdout, stderr */
|
|
+ close(0);
|
|
+ close(1);
|
|
+ close(2);
|
|
+
|
|
+ /* THIS HAS TO BE DONE TO AVOID PROBLEMS WITH STDERR BEING REDIRECTED TO SERVICE MESSAGE PIPE! */
|
|
+ /* re-open stdin, stdout, stderr with known values */
|
|
+ open("/dev/null",O_RDONLY);
|
|
+ open("/dev/null",O_WRONLY);
|
|
+ open("/dev/null",O_WRONLY);
|
|
+
|
|
return OK;
|
|
}
|
|
|