Bug 6380

Summary: Support redirection of start-stop-daemon I/O streams
Product: Busybox Reporter: damiano.albani
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: enhancement CC: busybox-cvs, glenn.burkhardt
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description damiano.albani 2013-07-11 08:00:40 UTC
start-stop-daemon (s-s-d) currently close stdin/stdout/stderr file descriptors when executing a program.
It would be useful to provide an option in s-s-d to alter that behavior.

Here's a related Debian bug report for their implementation of s-s-d: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627333

If you search on stackoverflow and others, you'll see that this feature is frequently requested.
Comment 1 Denys Vlasenko 2013-07-14 18:46:40 UTC
(In reply to comment #0)
> start-stop-daemon (s-s-d) currently close stdin/stdout/stderr file descriptors
> when executing a program.
> It would be useful to provide an option in s-s-d to alter that behavior.
> 
> Here's a related Debian bug report for their implementation of s-s-d:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627333
> 
> If you search on stackoverflow and others, you'll see that this feature is
> frequently requested.

*Which exactly* feature?
Comment 2 damiano.albani 2013-07-15 09:04:24 UTC
Which feature?
The one that is the subject of this bug report, i.e. to "support redirection of start-stop-daemon I/O streams".
Some reports:
http://stackoverflow.com/questions/8251933/how-can-i-log-the-stdout-of-a-process-started-by-start-stop-daemon
http://stackoverflow.com/questions/16069314/start-stop-daemon-redirect-stderr-from-php-script
Comment 3 Vincent G 2014-09-11 15:11:03 UTC
I submitted a patch for this feature in the bug #7430
Comment 4 Glenn Burkhardt 2021-07-10 15:20:15 UTC
The standard Debian 'start-stop-daemon' supports the "-C, --no-close' option for this.  Implementation is pretty trivial - just don't call bb_daemonize() with DAEMON_DEVNULL_STDIO if the option was given.
Comment 5 Glenn Burkhardt 2021-07-10 15:21:43 UTC
The standard Debian 'start-stop-daemon' supports the "-C, --no-close' option for this.  Implementation is pretty trivial - just don't call bb_daemonize() with DAEMON_DEVNULL_STDIO if the option was given.