Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2024 10:13:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 236117] /usr/sbin/daemon should support stdin,stdout,stderr redirect to files other than /dev/null
Message-ID:  <bug-236117-227-NNou3HJXOb@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-236117-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-236117-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236117

Tatsuki Makino <tatsuki_makino@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tatsuki_makino@hotmail.com

--- Comment #3 from Tatsuki Makino <tatsuki_makino@hotmail.com> ---
Although it's also weird that I'm still using 12.4-STABLE... :)
I replaced /usr/sbin/daemon with one built using the 10.4-STABLE source cod=
e.
This is because the behavior of standard output and standard error output h=
as
changed.

I used to use it as follows, but the current version, which specializes in =
log
output, changes in content.
daemon -p /tmp/daemon.pid cat /dev/somedevice > /tmp/output.dat

I had to update FreeBSD to 13 or 14, but I looked for a workaround to avoid
using daemon of version 10, and I got the following.
daemon -p /tmp/daemon.pid -m 0 -o /dev/null cat /dev/somedevice >
/tmp/output.dat

Setting -m to 0 is not in usage, but it prevents the two output descriptors=
 of
the child process from switching to the log pipe.
Using the -o or -S options suppresses the output of the log to standard out=
put.

It seems that stdin, stdout, and stderr will now be the same as when daemon=
 is
started.
I finally got to it today :)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236117-227-NNou3HJXOb>