]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/daemon.3
Libc-391.tar.gz
[apple/libc.git] / gen / FreeBSD / daemon.3
index 5efef13120248cafedcf92e7c2a27b9d802b9d43..04e0a519002565f91d1a387300d53b237911e85d 100644 (file)
@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"    @(#)daemon.3    8.1 (Berkeley) 6/9/93
 .\" SUCH DAMAGE.
 .\"
 .\"    @(#)daemon.3    8.1 (Berkeley) 6/9/93
-.\" $FreeBSD: src/lib/libc/gen/daemon.3,v 1.12 2002/01/16 15:21:39 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/daemon.3,v 1.14 2003/11/10 22:04:51 ghelmer Exp $
 .\"
 .Dd June 9, 1993
 .Dt DAEMON 3
 .\"
 .Dd June 9, 1993
 .Dt DAEMON 3
@@ -76,7 +76,8 @@ and
 .Xr setsid 2 .
 .Sh SEE ALSO
 .Xr fork 2 ,
 .Xr setsid 2 .
 .Sh SEE ALSO
 .Xr fork 2 ,
-.Xr setsid 2
+.Xr setsid 2 ,
+.Xr sigaction 2
 .Sh HISTORY
 The
 .Fn daemon
 .Sh HISTORY
 The
 .Fn daemon
@@ -101,3 +102,15 @@ should therefore either call
 .Fn daemon
 before opening any files or sockets, or verify that any file
 descriptors obtained have values greater than 2.
 .Fn daemon
 before opening any files or sockets, or verify that any file
 descriptors obtained have values greater than 2.
+.Pp
+The
+.Fn daemon
+function temporarily ignores
+.Dv SIGHUP
+while calling
+.Xr setsid 2
+to prevent a parent session group leader's calls to
+.Xr fork 2
+and then
+.Xr _exit 2
+from prematurely terminating the child process.