.\" 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
.Xr setsid 2 .
.Sh SEE ALSO
.Xr fork 2 ,
-.Xr setsid 2
+.Xr setsid 2 ,
+.Xr sigaction 2
.Sh HISTORY
The
.Fn daemon
.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.