<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/miscutils/crond.c, branch long_paths</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=long_paths</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=long_paths'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-07-30T18:02:23+00:00</updated>
<entry>
<title>*: use safe_waitpid() or wait_any_nohang() where approppriate</title>
<updated>2025-07-30T18:02:23+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-07-30T18:02:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a98b95b715359a8b002d1cb8e1f998a4afa2c73e'/>
<id>urn:sha1:a98b95b715359a8b002d1cb8e1f998a4afa2c73e</id>
<content type='text'>
function                                             old     new   delta
crond_main                                          1227    1237     +10
init_main                                            804     794     -10
wait_one                                             263     252     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 10/-21)            Total: -11 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>crond: reap orphaned grandchildren to prevent zombie buildup</title>
<updated>2025-07-30T17:49:23+00:00</updated>
<author>
<name>Valentin Lab</name>
<email>valentin.lab@kalysto.org</email>
</author>
<published>2025-05-31T01:56:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=41f677ec5daccaeae616a0bbf508d2a2d54bdac7'/>
<id>urn:sha1:41f677ec5daccaeae616a0bbf508d2a2d54bdac7</id>
<content type='text'>
If a cron job launches a background task, e.g. `sh -c "sleep 5 &amp;"`,
the shell exits immediately and the `sleep` process is re-parented to
PID 1.  When BusyBox `crond` itself happens to be PID 1 (common in a
minimal container), those orphans become direct children of `crond`.
Because `crond` only calls waitpid() for the PIDs it explicitly tracks,
these processes remain forever in Z state and the container slowly
fills with zombies.

Add a small `while (waitpid(-1, NULL, WNOHANG) &gt; 0)` sweep at the end
of check_completions() so any stray children are reaped.  When `crond`
is not PID 1 the loop returns -ECHILD immediately, so behaviour and
overhead on a normal system are unchanged.

Size impact: +12 bytes on x86-64 (gcc 13.3.0 -Os, static)

Signed-off-by: Valentin Lab &lt;valentin.lab@kalysto.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: crypt_make_pw_salt(): fix yescrypt's random salt last char</title>
<updated>2025-07-19T16:42:32+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-07-19T16:42:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c6b9e763731545f8e7f3482a90128859496c2964'/>
<id>urn:sha1:c6b9e763731545f8e7f3482a90128859496c2964</id>
<content type='text'>
function                                             old     new   delta
crypt_make_pw_salt                                   128     146     +18

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>crond: log5 fix typo, replace log level '4' with '5'</title>
<updated>2024-03-02T16:03:37+00:00</updated>
<author>
<name>Jones Syue</name>
<email>jonessyue@qnap.com</email>
</author>
<published>2024-01-29T02:58:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=01f2b5976d03fb50229d28297cf5ebd8be533203'/>
<id>urn:sha1:01f2b5976d03fb50229d28297cf5ebd8be533203</id>
<content type='text'>
log5() with crondlog(5, msg, va) seems making logging more consistent.

function                                             old     new   delta
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0)                 Total: 0 bytes

Signed-off-by: Jones Syue &lt;jonessyue@qnap.com&gt;
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
</entry>
<entry>
<title>Update applet size estimates</title>
<updated>2023-07-10T15:25:21+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-07-10T15:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5353df91cba7b397b9407701681708d0a1518df6'/>
<id>urn:sha1:5353df91cba7b397b9407701681708d0a1518df6</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>crond: implement support for setting PATH in crontab files</title>
<updated>2022-05-02T10:28:48+00:00</updated>
<author>
<name>Paul Fox</name>
<email>pgf@foxharp.boston.ma.us</email>
</author>
<published>2022-03-07T16:35:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=52a7bf6fa677abdb80f8e484f6ba77ed3d34e444'/>
<id>urn:sha1:52a7bf6fa677abdb80f8e484f6ba77ed3d34e444</id>
<content type='text'>
It's very inconvenient for a cron user not to be able to set a
"personal" PATH for their cron jobs, as is possible with other crons

function                                             old     new   delta
load_crontab                                         868     942     +74
.rodata                                           104878  104884      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 80/0)               Total: 80 bytes

Signed-off-by: Paul Fox &lt;pgf@foxharp.boston.ma.us&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: introduce and use chdir_or_warn()</title>
<updated>2022-01-13T11:56:10+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-01-13T11:56:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c2788f88f430da8ae5fb5f293b13fc2b167ea2fe'/>
<id>urn:sha1:c2788f88f430da8ae5fb5f293b13fc2b167ea2fe</id>
<content type='text'>
function                                             old     new   delta
chdir_or_warn                                          -      37     +37
send_cgi_and_exit                                    720     711      -9
xchdir                                                27      15     -12
setup_environment                                    233     217     -16
fork_job                                             449     433     -16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/4 up/down: 37/-53)            Total: -16 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>help text tweaks</title>
<updated>2020-12-13T18:04:19+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-13T18:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=11f1a2553e49c9ff2235688a41875ff8751517ce'/>
<id>urn:sha1:11f1a2553e49c9ff2235688a41875ff8751517ce</id>
<content type='text'>
function                                             old     new   delta
packed_usage                                       33547   33545      -2

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly</title>
<updated>2020-11-30T12:03:03+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-11-30T12:03:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=965b795b87c59ed45cc7f16a62301dbae65b1627'/>
<id>urn:sha1:965b795b87c59ed45cc7f16a62301dbae65b1627</id>
<content type='text'>
   text	   data	    bss	    dec	    hex	filename
1021988	    559	   5052	1027599	  fae0f	busybox_old
1021236	    559	   5052	1026847	  fab1f	busybox_unstripped

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</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.lua4.win/busybox-w32/commit/?id=6937487be73cd4563b876413277a295a5fe2f32c'/>
<id>urn:sha1: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>
</entry>
</feed>
