summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/daemon.3
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-01-16 15:21:39 +0000
committerru <ru@FreeBSD.org>2002-01-16 15:21:39 +0000
commit127a9d60125f5bac775b0f07b3c2bedcafbd689e (patch)
tree06ec3ccbe74d4039bd08f46a3f4e611742f9c70e /lib/libc/gen/daemon.3
parent40760c8180db4821ade737a5b29675a205089399 (diff)
downloadFreeBSD-src-127a9d60125f5bac775b0f07b3c2bedcafbd689e.zip
FreeBSD-src-127a9d60125f5bac775b0f07b3c2bedcafbd689e.tar.gz
mdoc(7) police: tidy up OpenBSD fixes.
Diffstat (limited to 'lib/libc/gen/daemon.3')
-rw-r--r--lib/libc/gen/daemon.312
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/libc/gen/daemon.3 b/lib/libc/gen/daemon.3
index 76932f3..a08d0df 100644
--- a/lib/libc/gen/daemon.3
+++ b/lib/libc/gen/daemon.3
@@ -64,13 +64,11 @@ is non-zero,
will redirect standard input, standard output, and standard error to
.Pa /dev/null .
.Sh RETURN VALUES
-Upon success,
-.Fn daemon
-returns 0; otherwise \-1 is returned.
+.Rv -std daemon
.Sh ERRORS
-The function
+The
.Fn daemon
-may fail and set
+function may fail and set
.Va errno
for any of the errors specified for the library functions
.Xr fork 2
@@ -86,14 +84,14 @@ function first appeared in
.Bx 4.4 .
.Sh CAVEATS
Unless the
-.Ar noclose
+.Fa noclose
argument is non-zero,
.Fn daemon
will close the first three file descriptors and redirect them to
.Pa /dev/null .
Normally, these correspond to standard input, standard output, and
standard error.
-However, if any of those file descriptors refer to something else they
+However, if any of those file descriptors refer to something else, they
will still be closed, resulting in incorrect behavior of the calling program.
This can happen if any of standard input, standard output, or standard
error have been closed before the program was run.
OpenPOWER on IntegriCloud