]> granicus.if.org Git - strace/commitdiff
Show "+++ exited..." with -C
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Mar 2012 13:27:40 +0000 (14:27 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 21 Mar 2012 13:27:40 +0000 (14:27 +0100)
* strace.c (trace): Show "+++ exited..." with -C too.
Save tcp->curcol after PTRACE_LISTEN failure too, just in case.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
strace.c

index 789ea92586d27e1fb70506c80bee100dd1ffec26..2c792ffa901b32e6eef196186b6bf9308127f5df 100644 (file)
--- 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;
                                }