]> granicus.if.org Git - strace/commitdiff
NOMMU: do not hide startup syscalls unless in -D mode
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 14 May 2013 22:35:46 +0000 (22:35 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 14 May 2013 22:50:11 +0000 (22:50 +0000)
On NOMMU systems in "strace PROG" case, we have no way to attach to
the tracee before it calls execve unless in -D mode.  That is, the
first execve call is very likely to be missed, and setting
hide_log_until_execve just results to empty log.

* strace.c (init) [NOMMU_SYSTEM]: Do not set hide_log_until_execve
unless in -D mode.

strace.c

index 7c851234ab7a5e6d2f06ec8e22472bd892e3ce27..5b7fbc27bd1a3dd450527853f72f5ce7de288b84 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -1797,7 +1797,8 @@ init(int argc, char *argv[])
         * in the startup_child() mode we kill the spawned process anyway.
         */
        if (argv[0]) {
-               hide_log_until_execve = 1;
+               if (!NOMMU_SYSTEM || daemonized_tracer)
+                       hide_log_until_execve = 1;
                skip_one_b_execve = 1;
                startup_child(argv);
        }