diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-28 01:25:03 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-01-28 01:25:03 +0100 |
commit | 000b601439d249a4afa2ceb6096850a702612d1e (patch) | |
tree | f96d07d6f4dea70485dfd474138d379b460fd3b4 /test | |
parent | f7db5dd876eb41a3f0d5fd223c831734acc8d8d1 (diff) | |
download | strace-000b601439d249a4afa2ceb6096850a702612d1e.tar.gz strace-000b601439d249a4afa2ceb6096850a702612d1e.tar.bz2 strace-000b601439d249a4afa2ceb6096850a702612d1e.tar.xz |
Fix a case of broken output if last seen syscall was exit
* defs.h: Rename tcp_last to printing_tcp. Explain what it means.
Remove printtrailer() function.
* process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL".
* strace.c: Add new variable printing_tcp.
(cleanup): Convert printtrailer() call to "printing_tcp = NULL".
(trace): Likewise.
(trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit.
(printleader): Set printing_tcp.
(printtrailer): Remove this function.
* syscall.c: Remove tcp_last variable.
(trace_syscall_entering): Don't set printing_tcp, printleader call now does it.
(trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL".
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/threaded_execve.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/threaded_execve.c b/test/threaded_execve.c index 51a4360..9cf3dae 100644 --- a/test/threaded_execve.c +++ b/test/threaded_execve.c @@ -11,7 +11,6 @@ * # Should not be confused by traced execve-ing thread * # replacing traced leader: * [LEADER_EXIT=1] strace -oLOG -f ./threaded_execve - * ^^^ so far slightly bad output with LEADER_EXIT=1 * * # Same, but different output mode. Output after execve * # should go into leader's LOG.<pid> file, not into execve'ed @@ -24,7 +23,7 @@ * ^^^^^^^^^^^^^^^^^^^^^ * In Linux 3.2, non-traced execve-ing thread does not * become traced after execve, even though it has pid == leader's pid - * after execve. + * after execve. And yet, strace's waitpid doesn't return ECHILD. * * # Run for NUM seconds, not just one second. * # Watch top to check for memory leaks in strace: |