<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/libbb/u_signal_names.c, branch zstd</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=zstd</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=zstd'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-02-08T12:49:06+00:00</updated>
<entry>
<title>win32: enhanced support for SIGPIPE</title>
<updated>2025-02-08T12:49:06+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2025-02-08T12:49:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5749feb35f44869643445b244ace1d62a7faf65c'/>
<id>urn:sha1:5749feb35f44869643445b244ace1d62a7faf65c</id>
<content type='text'>
Commit 68ddd4ec3c (win32: emulate SIGPIPE) allowed broken pipes
to be detected so that processes could either return EPIPE or
terminate.

Later, commit 1b2ee3667 (win32: add fake HUP and QUIT signals)
added support for two additional fake signals, thus allowing the
'kill' applet to refer to them by name and the shell to define
(though not execute) traps for them.

Add PIPE to the list of signals known to 'kill' and the shell,
though still without support for calling the trap function.

(GitHub issue #482)
</content>
</entry>
<entry>
<title>libbb: code shrink u_signal_names.c</title>
<updated>2021-09-03T12:49:24+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-09-03T12:49:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=69c261f09e844e5b7434531614a91c30e40925da'/>
<id>urn:sha1:69c261f09e844e5b7434531614a91c30e40925da</id>
<content type='text'>
Reduce amount of wasted space in the signals[][] array.

Saves 48 bytes.
</content>
</entry>
<entry>
<title>win32: emulate SIGPIPE</title>
<updated>2018-12-11T15:52:31+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2018-12-11T15:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=68ddd4ec3c1275c66e01172498055817cbb10f04'/>
<id>urn:sha1:68ddd4ec3c1275c66e01172498055817cbb10f04</id>
<content type='text'>
The code to check whether a write error is due to a broken pipe
can now either:

- return with error EPIPE;
- cause the process to exit with code 128+SIGPIPE.

The default is the latter but the behaviour can be changed by issuing
signal(SIGPIPE, SIG_IGN) and signal(SIGPIPE, SIG_DFL) calls.

No actual signal is involved so kill can't send SIGPIPE and handlers
other than SIG_IGN and SIG_DFL aren't supported.

This does, however, avoid unsightly 'broken pipe' errors from commands
like the example in GitHub issue #99:

  dd if=/dev/urandom | tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;
</content>
</entry>
<entry>
<title>libbb/u_signal_names.c: don't check errno after bb_strtou</title>
<updated>2018-10-31T10:28:37+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2018-09-12T14:06:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=656ca7bdd992f6aabbdd5cadbac5241f6e1971a1'/>
<id>urn:sha1:656ca7bdd992f6aabbdd5cadbac5241f6e1971a1</id>
<content type='text'>
Since we're comparing the return value to a smallish integer anyway, we
might as well use that bb_strtou() returns UINT_MAX for malformed
input. Referencing errno is kinda bloaty on glibc.

While NSIG is not in POSIX, we do already rely on it being defined,
compile-time const and smallish, since arrays in struct globals_misc are
defined in terms of it.

function                                             old     new   delta
get_signum                                           312     286     -26

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>libbb: optionally honour libc provided SIGRTMIN/SIGRTMAX in get_signum()</title>
<updated>2018-10-31T10:13:55+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>rasmus.villemoes@prevas.dk</email>
</author>
<published>2018-09-12T14:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=571e525a141a2de87b9c2ced485745e96418d921'/>
<id>urn:sha1:571e525a141a2de87b9c2ced485745e96418d921</id>
<content type='text'>
When an application documents that it responds such and such to
SIGRTMIN+n, that almost always means with respect to the libc-provided
SIGRTMIN. Hence I disagree with the "more correct" in commit
7b276fc17594. In any case, this is rather unfortunate:

36
34

(the first shell is bash). We probably can't change default behaviour
after 7 years, but at least we can provide a config option.

We avoid a little code generation (repeated calls to
__libc_current_sigrtmin) by stashing SIGRTMIN/SIGRTMAX in local
variables, but it does cost ~50 bytes. The next patch serves as penance
for that.

Signed-off-by: Rasmus Villemoes &lt;rasmus.villemoes@prevas.dk&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>regularize format of source file headers, no code changes</title>
<updated>2017-09-18T14:28:43+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-09-18T14:28:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0c4dbd481aedb5d22c1048e7f7eb547a3b5e50a5'/>
<id>urn:sha1:0c4dbd481aedb5d22c1048e7f7eb547a3b5e50a5</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: allow "trap NUM [SIG]..." syntax</title>
<updated>2017-07-25T18:06:17+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-25T18:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=86981e3ad2d03e77d1f668ac1603a041be448dae'/>
<id>urn:sha1:86981e3ad2d03e77d1f668ac1603a041be448dae</id>
<content type='text'>
While at it, make get_signum() return -1 for numeric strings &gt;= NSIG.

function                                             old     new   delta
trapcmd                                              292     306     +14
get_signum                                           295     300      +5
builtin_trap                                         413     412      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 19/-1)              Total: 18 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>config: deindent all help texts</title>
<updated>2017-07-21T07:50:55+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2017-07-21T07:50:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=72089cf6b4a77214ec4fd21d5ee5bf56958781cb'/>
<id>urn:sha1:72089cf6b4a77214ec4fd21d5ee5bf56958781cb</id>
<content type='text'>
Those two spaces after tab have no effect, and always a nuisance when editing.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: slap on a few ALIGN1/2s where appropriate</title>
<updated>2016-04-22T16:09:21+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2016-04-22T16:09:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3e134ebf6afb5552b3619f98f6a2ffa01a07eebb'/>
<id>urn:sha1:3e134ebf6afb5552b3619f98f6a2ffa01a07eebb</id>
<content type='text'>
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map"

   text	   data	    bss	    dec	    hex	filename
 829901	   4086	   1904	 835891	  cc133	busybox_before
 829665	   4086	   1904	 835655	  cc047	busybox

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>kill[all[5]],pkill: make signal list show signal numbers, and show RTMIN/MAX</title>
<updated>2011-01-03T12:08:58+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>dvlasenk@redhat.com</email>
</author>
<published>2011-01-03T12:08:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=327d2885ecab7fb8e876026c428c2e415c5742c1'/>
<id>urn:sha1:327d2885ecab7fb8e876026c428c2e415c5742c1</id>
<content type='text'>
function                                             old     new   delta
print_signames                                        31      64     +33
signals                                              224     231      +7

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
</content>
</entry>
</feed>
