[Bug 7898] ps doesn't handle SIGPIPE correctly
bugzilla at busybox.net
bugzilla at busybox.net
Sun Mar 1 19:17:55 UTC 2015
https://bugs.busybox.net/show_bug.cgi?id=7898
--- Comment #3 from Denys Vlasenko <vda.linux at googlemail.com> 2015-03-01 19:17:55 UTC ---
(In reply to comment #2)
> Ok, let me explain this issue in more detail. Try to run command:
>
> strace -e trace=signal busybox ps | head -n 1
> --- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=4385, si_uid=1000} ---
> +++ killed by SIGPIPE +++
This is intended.
Unix-like OSes have SIGPIPE because it's impractical to expect _every_ program
which prints to stdout to correctly handle EPIPE write error. People will
forget to do that, making these constructs:
<program> | head
<program> | less
not terminating when second member of the pipe exits.
> However if we working on Android system
> there a small daemon called 'debuggerd' which collects crash dump information
> about all crashed programs, including programs killed by signals.
>
> So crashed ps triggers error handling and bug-reporting mechanism in Android
> system, which as i believe shouldn't happen.
This is a bug in debuggerd. It needs to ignore deaths from SIGPIPE and a few
other signals (SIGINT, SIGQUIT, SIGABRT).
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list