[srvx-commits] CVS: services/src main.c,1.140,1.141
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-10-23 12:39:42
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv25874/src
Modified Files:
main.c
Log Message:
close stdin/out/err when starting in daemon mode
Index: main.c
===================================================================
RCS file: /cvsroot/srvx/services/src/main.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -r1.140 -r1.141
*** main.c 21 Oct 2002 02:30:13 -0000 1.140
--- main.c 23 Oct 2002 12:39:39 -0000 1.141
***************
*** 757,760 ****
--- 757,764 ----
}
setsid();
+ /* Close stdin, stdout, stderr, since we don't expect to use them from now on. */
+ close(0);
+ close(1);
+ close(2);
}
|