<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox.git/debianutils/start_stop_daemon.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/'/>
<entry>
<title>start-stop-daemon: make --output not depend on FANCY</title>
<updated>2023-11-08T13:42:00+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-11-08T13:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=59cf2c23aebaeed29fd5a8a0f112e01c1f1dd45f'/>
<id>59cf2c23aebaeed29fd5a8a0f112e01c1f1dd45f</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: do not lose error messages with -b</title>
<updated>2023-11-08T13:07:20+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-11-08T13:07:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=58ca629fd27cd9d7f91a8ea90435cdb3f15381aa'/>
<id>58ca629fd27cd9d7f91a8ea90435cdb3f15381aa</id>
<content type='text'>
function                                             old     new   delta
start_stop_daemon_main                              1186    1206     +20
bb_daemonize_or_rexec                                196     212     +16
bb_banner                                             47      46      -1
packed_usage                                       34656   34645     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 36/-12)             Total: 24 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
function                                             old     new   delta
start_stop_daemon_main                              1186    1206     +20
bb_daemonize_or_rexec                                196     212     +16
bb_banner                                             47      46      -1
packed_usage                                       34656   34645     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 36/-12)             Total: 24 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: typo fix</title>
<updated>2023-11-08T11:36:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-11-08T11:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=2de67a62e812f2e4d13280f2b78712b6d344cfb7'/>
<id>2de67a62e812f2e4d13280f2b78712b6d344cfb7</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: implement option -O|--output</title>
<updated>2023-11-07T20:44:07+00:00</updated>
<author>
<name>Louai Al-Khanji</name>
<email>louai@astranis.com</email>
</author>
<published>2023-11-07T20:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=389c0458da7d6e941886ea3b846c98cfd63dfdd3'/>
<id>389c0458da7d6e941886ea3b846c98cfd63dfdd3</id>
<content type='text'>
If specified redirect command stdout and stderr to given pathname.

function                                             old     new   delta
start_stop_daemon_main                              1130    1186     +56
start_stop_daemon_longopts                           164     173      +9
packed_usage                                       34653   34656      +3
.rodata                                           105384  105386      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 70/0)               Total: 70 bytes

Signed-off-by: Louai Al-Khanji &lt;louai@astranis.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If specified redirect command stdout and stderr to given pathname.

function                                             old     new   delta
start_stop_daemon_main                              1130    1186     +56
start_stop_daemon_longopts                           164     173      +9
packed_usage                                       34653   34656      +3
.rodata                                           105384  105386      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 70/0)               Total: 70 bytes

Signed-off-by: Louai Al-Khanji &lt;louai@astranis.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: update comment, no code changes</title>
<updated>2023-11-07T14:59:11+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-11-07T14:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=da8d1d84fd46e61eec0772ff339fde0952777a5f'/>
<id>da8d1d84fd46e61eec0772ff339fde0952777a5f</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: add -d DIR chdir option</title>
<updated>2023-11-07T06:12:40+00:00</updated>
<author>
<name>ejaaskel</name>
<email>esa.jaaskela@suomi24.fi</email>
</author>
<published>2023-11-07T06:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=73f28134fc0987474384fde345559d4b34bf5385'/>
<id>73f28134fc0987474384fde345559d4b34bf5385</id>
<content type='text'>
Add option to change the running directory before starting the process.
This can be done using -d or --chdir options. Add also test cases to
start-stop-daemon to test out the directory change option.

function                                             old     new   delta
packed_usage                                       34602   34648     +46
start_stop_daemon_main                              1107    1130     +23
start_stop_daemon_longopts                           156     164      +8
.rodata                                           105382  105384      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 79/0)               Total: 79 bytes

Signed-off-by: ejaaskel &lt;esa.jaaskela@suomi24.fi&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add option to change the running directory before starting the process.
This can be done using -d or --chdir options. Add also test cases to
start-stop-daemon to test out the directory change option.

function                                             old     new   delta
packed_usage                                       34602   34648     +46
start_stop_daemon_main                              1107    1130     +23
start_stop_daemon_longopts                           156     164      +8
.rodata                                           105382  105384      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 79/0)               Total: 79 bytes

Signed-off-by: ejaaskel &lt;esa.jaaskela@suomi24.fi&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: fix --help: -K or -S is required</title>
<updated>2023-11-07T05:55:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-11-07T05:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=0c71497e654fb5e9a9272f81ddb5d994d2839df4'/>
<id>0c71497e654fb5e9a9272f81ddb5d994d2839df4</id>
<content type='text'>
function                                             old     new   delta
.rodata                                           105381  105382      +1
packed_usage                                       34638   34602     -36
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 1/-36)             Total: -35 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
function                                             old     new   delta
.rodata                                           105381  105382      +1
packed_usage                                       34638   34602     -36
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 1/-36)             Total: -35 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libbb: code shrink: introduce and use [_]exit_SUCCESS()</title>
<updated>2022-01-05T21:16:06+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-01-05T21:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=db5546ca101846f18294a43b39883bc4ff53613a'/>
<id>db5546ca101846f18294a43b39883bc4ff53613a</id>
<content type='text'>
function                                             old     new   delta
exit_SUCCESS                                           -       7      +7
_exit_SUCCESS                                          -       7      +7
run_pipe                                            1562    1567      +5
pseudo_exec_argv                                     399     400      +1
finish                                                86      87      +1
start_stop_daemon_main                              1109    1107      -2
shutdown_on_signal                                    38      36      -2
runsv_main                                          1662    1660      -2
redirect                                            1070    1068      -2
read_line                                             79      77      -2
pause_and_low_level_reboot                            54      52      -2
list_i2c_busses_and_exit                             483     481      -2
less_exit                                             12      10      -2
identify                                            4123    4121      -2
grep_file                                           1161    1159      -2
getty_main                                          1519    1517      -2
fsck_minix_main                                     2681    2679      -2
free_session                                         132     130      -2
fdisk_main                                          4739    4737      -2
clean_up_and_exit                                     53      51      -2
bsd_select                                          1566    1564      -2
bb_daemonize_or_rexec                                198     196      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/17 up/down: 21/-34)           Total: -13 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
function                                             old     new   delta
exit_SUCCESS                                           -       7      +7
_exit_SUCCESS                                          -       7      +7
run_pipe                                            1562    1567      +5
pseudo_exec_argv                                     399     400      +1
finish                                                86      87      +1
start_stop_daemon_main                              1109    1107      -2
shutdown_on_signal                                    38      36      -2
runsv_main                                          1662    1660      -2
redirect                                            1070    1068      -2
read_line                                             79      77      -2
pause_and_low_level_reboot                            54      52      -2
list_i2c_busses_and_exit                             483     481      -2
less_exit                                             12      10      -2
identify                                            4123    4121      -2
grep_file                                           1161    1159      -2
getty_main                                          1519    1517      -2
fsck_minix_main                                     2681    2679      -2
free_session                                         132     130      -2
fdisk_main                                          4739    4737      -2
clean_up_and_exit                                     53      51      -2
bsd_select                                          1566    1564      -2
bb_daemonize_or_rexec                                198     196      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/17 up/down: 21/-34)           Total: -13 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libbb: reduce the overhead of single parameter bb_error_msg() calls</title>
<updated>2019-07-02T09:35:03+00:00</updated>
<author>
<name>James Byrne</name>
<email>james.byrne@origamienergy.com</email>
</author>
<published>2019-07-02T09:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=6937487be73cd4563b876413277a295a5fe2f32c'/>
<id>6937487be73cd4563b876413277a295a5fe2f32c</id>
<content type='text'>
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().

This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.

Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.

This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.

The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):

Arm:     -92 bytes
MIPS:    -52 bytes
PPC:   -1836 bytes
x86_64: -938 bytes

Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.

Signed-off-by: James Byrne &lt;james.byrne@origamienergy.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().

This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.

Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.

This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.

The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):

Arm:     -92 bytes
MIPS:    -52 bytes
PPC:   -1836 bytes
x86_64: -938 bytes

Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.

Signed-off-by: James Byrne &lt;james.byrne@origamienergy.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>start-stop-daemon: change priority before dropping privileges</title>
<updated>2019-06-09T11:47:49+00:00</updated>
<author>
<name>Aitor Esteve Alvarado</name>
<email>aesteve@singularaircraft.com</email>
</author>
<published>2019-03-07T09:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=7b6d4f50c97b4f375687e8216313b10598b44b49'/>
<id>7b6d4f50c97b4f375687e8216313b10598b44b49</id>
<content type='text'>
Currently start-stop-daemon fails when using both the -c option (set uid)
and -N option (set niceness/priority) as it first drops privileges and then
tries to increase the priority. This patch changes the order of execution.

Signed-off-by: Aitor Esteve Alvarado &lt;aesteve@singularaircraft.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently start-stop-daemon fails when using both the -c option (set uid)
and -N option (set niceness/priority) as it first drops privileges and then
tries to increase the priority. This patch changes the order of execution.

Signed-off-by: Aitor Esteve Alvarado &lt;aesteve@singularaircraft.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
