Bug 7430 - Add new options to start-stop-daemon
Summary: Add new options to start-stop-daemon
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.22.x
Hardware: All Linux
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-11 15:08 UTC by Vincent G
Modified: 2021-07-11 18:32 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments
A patch over start_stop_daemon.c (8.37 KB, application/octet-stream)
2014-09-11 15:08 UTC, Vincent G
Details
updated patch for version 1.33.1 (9.83 KB, patch)
2021-07-11 18:32 UTC, Glenn Burkhardt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent G 2014-09-11 15:08:52 UTC
Created attachment 5666 [details]
A patch over start_stop_daemon.c

Here is a patch to implement the following options to start-stop-daemon :

//usage:     "\n	-g,--group GRP		Change group"
//usage:     "\n	-r,--chroot DIR		Change root directory"
//usage:     "\n	-d,--chdir DIR		Change current directory"
//usage:     "\n	-C,--no-close		Do not close any file descriptor with -b"
//usage:     "\n	-k,--umask MASK		set umask"

These options are available in the real debian start-stop-daemon and were missing (see bug #6380).
Comment 1 Vincent G 2014-09-11 15:24:56 UTC
In my patch, please remove the following line (which is wrong):

/* warning : setpriority can legitimately return -1 ! */
Comment 2 Glenn Burkhardt 2021-07-10 15:23:46 UTC
I'd really like to see the "-C,--no-close" option implemented.  And it's really simple - just don't call bb_daemonize() with DAEMON_DEVNULL_STDIO if the option was given.
Comment 3 Glenn Burkhardt 2021-07-11 18:32:32 UTC
Created attachment 9051 [details]
updated patch for version 1.33.1

Add updated patch for version 1.33.1.