An example is, in one terminal "sudo su -; echo $$", and in
another terminal, "kill -9 $PID" (the pid of the su -). It
should not print "(core dumped)", unless the kill signal
specified so, e.g. kill -7 or kill -11.
Signed-off-by: pcpa <paulo.cesar.pereira.de.andrade@gmail.com>
{
if (WIFSIGNALED (status))
{
+ fprintf (stderr, "%s%s\n", strsignal (WTERMSIG (status)),
+ WCOREDUMP (status) ? _(" (core dumped)") : "");
status = WTERMSIG (status) + 128;
- if (WCOREDUMP (status))
- fprintf (stderr, _("%s (core dumped)\n"),
- strsignal (WTERMSIG (status)));
}
else
status = WEXITSTATUS (status);