]> granicus.if.org Git - strace/commitdiff
strace.c: reset printing_tcp on print_event_exit
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 22 Jan 2018 00:55:05 +0000 (01:55 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 24 Jan 2018 01:56:15 +0000 (01:56 +0000)
print_event_exit should have printing_tcp setup analogous to printleader and
syscall_exit_trace before printing its part, otherwise it spuriously resets
curcol in line_ended for the stale printing_tcp if followfork == 2.

* strace.c (print_event_exit): Set printing_tcp to tcp before printing
exiting event line and calling line_ended.

strace.c

index 9fc353fadac4cb544e169d0622c8b84025ba354f..0a8195804232d548a720600846a0228c4c63032d 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2232,6 +2232,8 @@ print_event_exit(struct tcb *tcp)
                 */
                tprints(" <unfinished ...>");
        }
+
+       printing_tcp = tcp;
        tprints(") ");
        tabto();
        tprints("= ?\n");