<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/coreutils/timeout.c, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2024-10-02T13:56:04+00:00</updated>
<entry>
<title>win32: adjust usage for timeout and pipe_progress</title>
<updated>2024-10-02T13:56:04+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-10-02T13:56:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=4c095ae6efd1fa8773a58fb4a1dc79f5810b2369'/>
<id>urn:sha1:4c095ae6efd1fa8773a58fb4a1dc79f5810b2369</id>
<content type='text'>
Reduce the divergence from upstream in the usage messages for
timeout and pipe_progress.

This only affects the source; there are no visible of functional
changes.
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2024-07-14T09:11:45+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-07-14T09:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6198a0ff055751d5cda4017a3d4821dc93ad77d1'/>
<id>urn:sha1:6198a0ff055751d5cda4017a3d4821dc93ad77d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>timeout: allow fractional seconds in timeout values</title>
<updated>2024-07-13T19:34:18+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-04-08T12:12:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e4b5ccd13bb59eaaec6aa7f22655cc469f8900a2'/>
<id>urn:sha1:e4b5ccd13bb59eaaec6aa7f22655cc469f8900a2</id>
<content type='text'>
The 'timeout' applet uses parse_duration_str() to obtain its
timeout values.  The default configuration enables float durations.

However, the applet silently ignores fractional seconds.  This
results in unexpected behaviour:

   $ timeout 5.99 sleep 5.1; echo $?
   Terminated
   143

When float durations are enabled ensure that any fractional seconds
are taken into account.

function                                             old     new   delta
timeout_wait                                          44      92     +48
timeout_main                                         383     365     -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 48/-18)             Total: 30 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>kill: killing a zombie process should fail</title>
<updated>2024-05-14T11:33:03+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-05-14T11:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=569de936abb90f4c7cdca9da111a6ea780b135bf'/>
<id>urn:sha1:569de936abb90f4c7cdca9da111a6ea780b135bf</id>
<content type='text'>
A process which has exited may still have its process handle
held open by its children.  Such a process doesn't appear in
the process table.  It is thus similar to a zombie process in
UNIX.  Using kill(1) to interact with such a process was seen
to succeed, contrary to expectation.

The code for "ordinary" signals in kill(2) did check if the
process was still active but didn't treat an attempt to kill
an inactive process as an error.  Furthermore, sending SIGKILL
or the fake signal 0 to a process didn't even check if the
process was still active.

Rearrange the implementation of kill(2) so that an attempt to
signal an inactive process is treated as an error.  This also
consolidates handling of SIGKILL and signal 0 with "ordinary"
signals.

Saves 96 bytes.

(GitHub issue #416)
</content>
</entry>
<entry>
<title>timeout: fix handling of timeouts</title>
<updated>2024-04-08T12:22:30+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2024-04-08T12:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=55ecf3a746db5131ca078875168a59feab8b26f1'/>
<id>urn:sha1:55ecf3a746db5131ca078875168a59feab8b26f1</id>
<content type='text'>
The 'timeout' applet, by default, accepted fractional seconds but
ignored the fraction.  Moreover, in busybox-w32, even the integer
part was incorrectly handled.

Rewrite the (Windows) code to fix both problems.

A patch has also been submitted to fix upstream.  If that is
accepted the Windows port will need to be updated to match.

Saves 8-16 bytes.

(GitHub issue #400)
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2023-07-13T07:06:26+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-07-13T07:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bd978d0256fd3a67de1a7dd54f1a37f9435be363'/>
<id>urn:sha1:bd978d0256fd3a67de1a7dd54f1a37f9435be363</id>
<content type='text'>
</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>win32: changes to signal handling</title>
<updated>2023-05-23T09:57:56+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-05-23T09:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=89aa9d783c535670c6aed1d32c8740b7474cca00'/>
<id>urn:sha1:89aa9d783c535670c6aed1d32c8740b7474cca00</id>
<content type='text'>
Use an exit code of the form (signal &lt;&lt; 24) when a process exits
due to a signal.  This replaces the previous use of (signal + 128).
This makes it easier to distinguish exit codes from signals.

Allow kill(2) to handle all defined signals, not just EXIT, TERM
and KILL.

The kill and timeout applets now accept any defined signals.

Convert certain Windows status codes Unix-style signal codes.

In ash:

- Exit as if with SIGINT in raise_interrupt() rather than call
  raise(SIGINT).  The latter returns an exit code of 3.

- Detect if a child process exits as if with SIGINT.  If not and if
  the parent is an interactive top-level shell, reset pending_int.
  This prevents the parent from seeing an INT if the child hasn't
  reported it exited due to INT.  (Probably due to it being an
  interactive shell.)

Costs 132-136 bytes.
</content>
</entry>
<entry>
<title>timeout: code shrink</title>
<updated>2023-05-23T09:57:56+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-05-23T09:57:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c2c0cfbeb6f07fa3257a60760d5c8a5382cee6e9'/>
<id>urn:sha1:c2c0cfbeb6f07fa3257a60760d5c8a5382cee6e9</id>
<content type='text'>
In the win32 code the 'parent' variable is always zero.  It's also
used as the pid to be killed when the child process survives the
initial kill attempt.  Although this works as intended there's no
need for the 'parent' variable.

Saves 16 bytes.
</content>
</entry>
<entry>
<title>Fix POSIX build; new year</title>
<updated>2022-02-09T11:24:33+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-02-09T11:24:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=7d5de438255f7571906a798bb6a3de80bd4c09d9'/>
<id>urn:sha1:7d5de438255f7571906a798bb6a3de80bd4c09d9</id>
<content type='text'>
</content>
</entry>
</feed>
