Comment 7 for bug 1062412

Revision history for this message
yzp15 (yzp15) wrote :

> Note that the CUPS version which I had run under strace had a segfault bug, but this should not make strace crash.

Actually, there is a code in strace.c (main -> terminate() ) to raise the signal which killed the traced process. Strace does it exactly before exit
https://github.com/strace/strace/blob/1d98b287a4cb6901d369d78126d481508f9e35ef/strace.c#L2655

 if (exit_code > 0xff) {
  ...
  /* Child was killed by a signal, mimic that. */
  exit_code &= 0xff;
  signal(exit_code, SIG_DFL);
  ...
  raise(exit_code);
 ...
 exit(exit_code);

Code was added in 2008-09-29 commit
https://github.com/strace/strace/commit/a68096576afc07e51d33b49c432d658b27a7f13c
> (main): Exit/kill ourself with straced child's exitcode/signal.

Same for other reports in https://errors.ubuntu.com/?package=strace&period=year like Bug #1430741