From: Denys Vlasenko Date: Wed, 21 Mar 2012 13:27:40 +0000 (+0100) Subject: Show "+++ exited..." with -C X-Git-Tag: v4.7~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5e0908a173cc8005ed73fa5c0eab59d03baa7f3;p=strace Show "+++ exited..." with -C * strace.c (trace): Show "+++ exited..." with -C too. Save tcp->curcol after PTRACE_LISTEN failure too, just in case. Signed-off-by: Denys Vlasenko --- diff --git a/strace.c b/strace.c index 789ea925..2c792ffa 100644 --- a/strace.c +++ b/strace.c @@ -2018,7 +2018,7 @@ trace(void) if (WIFEXITED(status)) { if (pid == strace_child) exit_code = WEXITSTATUS(status); - if (!cflag /* && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL) */ ) { + if (cflag != CFLAG_ONLY_STATS) { printleader(tcp); tprintf("+++ exited with %d +++\n", WEXITSTATUS(status)); line_ended(); @@ -2152,6 +2152,7 @@ trace(void) * (that is, process really stops. It used to continue to run). */ if (ptrace_restart(PTRACE_LISTEN, tcp, 0) < 0) { + tcp->curcol = curcol; cleanup(); return -1; }