When the first exec fails, strace used to print the trace of the child process till its end, producing a lot of confusing output. Enhance the diagnostics by hiding irrelevant parts of the trace. * defs.h (TCB_CHECK_EXEC_SYSCALL): New macro. Change values of TCB_* macros listed after TCB_CHECK_EXEC_SYSCALL. (check_exec_syscall): New macro. * strace.c (dispatch_event) <TE_STOP_BEFORE_EXECVE>: Clear TCB_CHECK_EXEC_SYSCALL flag. * syscall.c (syscall_entering_trace): Do not clear TCB_HIDE_LOG when TCB_CHECK_EXEC_SYSCALL is set, set TCB_CHECK_EXEC_SYSCALL along with clearing TCB_HIDE_LOG. (syscall_exiting_decode): Set TCB_HIDE_LOG if TCB_CHECK_EXEC_SYSCALL is set. * tests/first_exec_failure.test: New file. * tests/Makefile.am (MISC_TESTS): Add first_exec_failure.test. Closes: https://github.com/strace/strace/issues/88
strace - the linux syscall tracer
This is strace -- a diagnostic, debugging and instructional userspace utility with a traditional command-line interface for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.
strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file COPYING for details.
See the file NEWS for information on what has changed in recent versions.
Please read the file INSTALL-git for installation instructions.
Please take a look at the guide for new contributors if you want to get involved in strace development.
The user discussion and development of strace take place on the strace mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to strace-devel@lists.strace.io. The mailing list archives are available at https://lists.strace.io/pipermail/strace-devel/ and other archival sites.
The GIT repository of strace is available at GitHub and GitLab.
The latest binary strace packages are available in many repositories, including OBS, Fedora rawhide, and Sisyphus.