]> granicus.if.org Git - strace/commitdiff
Print at least one space between SYSCALL(ARGS) and = RESULT if tracee is killed
authorDenys Vlasenko <dvlasenk@redhat.com>
Wed, 8 Jun 2011 14:15:04 +0000 (16:15 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Wed, 8 Jun 2011 14:15:04 +0000 (16:15 +0200)
We already do it in the normal case, but in rare code path where
tracee is gone (SIGKILLed?) sometimes we were printing this:
"SYSCALL(ARGS <unavailable>)= ? <unavailable>" - note jammed together ")=".
test/sigkill_rain.c can be used to verify the fix.

* strace.c (printleader): add a space after ")" in " <unavailable>)"

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
strace.c

index fcdb37e3dfa2062812237d5e422f7bbefd2e8dab..d5579d3446ed71f76c6275a8f389fb7316b9128a 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2953,7 +2953,7 @@ printleader(struct tcb *tcp)
        if (tcp_last) {
                if (tcp_last->ptrace_errno) {
                        if (tcp_last->flags & TCB_INSYSCALL) {
-                               tprintf(" <unavailable>)");
+                               tprintf(" <unavailable>) ");
                                tabto(acolumn);
                        }
                        tprintf("= ? <unavailable>\n");