I observed a case when signal delivery message was buffered
by stdio until it was flushed along with the next syscall
entry message.
* strace.c (trace): Flush output buffers in a few more cases.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
#endif
printtrailer();
}
+ fflush(tcp->outf);
droptcb(tcp);
continue;
}
tprintf("+++ exited with %d +++", WEXITSTATUS(status));
printtrailer();
}
+ fflush(tcp->outf);
droptcb(tcp);
continue;
}
signame(sig)
PC_FORMAT_ARG);
printtrailer();
+ fflush(tcp->outf);
}
goto restart_tracee;
}
tcp_last->flags |= TCB_REPRINT;
tprints(" <unfinished ...>");
printtrailer();
+ fflush(tcp->outf);
}
/* We assume that ptrace error was caused by process death.
* We used to detach(tcp) here, but since we no longer