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)