[Toybox] default SIGPIPE handler that calls _exit(0)?

enh enh at google.com
Sat Apr 25 12:14:44 PDT 2015


what's the plan wrt SIGPIPE? the desktop is pretty inconsistent. many
(but not all) commands install a signal handler that does _exit(0).
others (coreutils 8.21's ls, say) do nothing. normally "what you do
about SIGPIPE" isn't a problem but on Android that leads to a crash
report and people filing "ls crashed" bugs against me. (our default
shell PS setup is also noisy about crashes.)

in the past, like the desktop, we've fixed this on an ad hoc basis. i
just uploaded a change to toolbox
(https://android-review.googlesource.com/148331) to do this in the
driver instead. [pretend for a moment that toolbox isn't going
away...] any tool that actually cares about SIGPIPE behavior is
unaffected because it can install its own SIGPIPE handler. any tool
that doesn't care is unaffected because it's still going to exit; it's
just going to exit cleanly.

does this sound like a good idea for toybox?

-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.

 1429989284.0


More information about the Toybox mailing list