]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
daemon.3: Note that damon is buggy with respect to controlling tty acquisition
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 16 Oct 2015 18:11:36 +0000 (20:11 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 16 Oct 2015 19:24:55 +0000 (21:24 +0200)
Reported-by: Johannes Stüttgen <Johannes.Stuettgen@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/daemon.3

index ec8ff647d733919ee8e7092d5fdaf1357939a2de..41d0e62825f4b2b9907c976e898381e234994afc 100644 (file)
@@ -114,6 +114,26 @@ major and minor numbers.
 In this case,
 .I errno
 need not be set.
+.SH BUGS
+The GNU C library implementation of this function was taken from BSD,
+and does not employ the double-fork technique (i.e.,
+.BR fork (2),
+.BR setsid (2),
+.BR fork (2))
+that is necessary to ensure that the resulting daemon process is
+not a session leader.
+Instead, the resulting daemon
+.I is
+a session leader.
+.\" FIXME https://sourceware.org/bugzilla/show_bug.cgi?id=19144
+.\" Tested using a program that uses daemon() and then opens an
+.\" otherwise unused console device (/dev/ttyN) that does not
+.\" have an associated getty process.
+On systems that follow System V semantics (e.g., Linux),
+this means that if the daemon opens a terminal that is not
+already a controlling terminal for another session,
+then that terminal will inadvertently become
+the controlling terminal for the daemon.
 .SH SEE ALSO
 .BR fork (2),
 .BR setsid (2)