[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
system/2178: rwhod sends errors to stderr after calling daemon
- To: gnats@openbsd.org
- Subject: system/2178: rwhod sends errors to stderr after calling daemon
- From: janjaap@hwh.nl
- Date: Wed, 14 Nov 2001 22:22:19 +0100 (CET)
- Resent-Date: Wed, 14 Nov 2001 14:30:02 -0700 (MST)
- Resent-From: gnats@cvs.openbsd.org (GNATS Management)
- Resent-Message-Id: <200111142130.fAELU2Rw026275@cvs.openbsd.org>
- Resent-Reply-To: gnats@cvs.openbsd.org, janjaap@stack.nl
- Resent-To: bugs@cvs.openbsd.org
>Number: 2178
>Category: system
>Synopsis: rwhod sends errors to stderr after calling daemon
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bugs
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 14 14:30:01 MST 2001
>Last-Modified:
>Originator: Janjaap van Velthooven
>Organization:
net
>Release: current
>Environment:
System : OpenBSD 3.0
Architecture: OpenBSD.sparc
Machine : sparc
>Description:
after calling daemon(1, 0) rwhod has one diagnostic message
sent to stderr which has been closed so noone will ever
see the message if and when the problem occurs
>How-To-Repeat:
look at code (usr.sbin/rwhod/rwhod.c):
...
160 if (!debug)
161 daemon(1, 0);
162
163 if (chdir(_PATH_RWHODIR) < 0) {
164 (void)fprintf(stderr, "rwhod: %s: %s\n",
165 _PATH_RWHODIR, strerror(errno));
166 exit(1);
167 }
...
>Fix:
either move the call to daemon beyond the followinbg block
or syslog the message.
>Audit-Trail:
>Unformatted: