|author||Denys Vlasenko <email@example.com>||Mon Feb 08 18:08:46 2016 +0100|
|committer||Denys Vlasenko <firstname.lastname@example.org>||Mon Feb 08 18:17:38 2016 +0100|
If stdin/stdout aren't open on startup, open them to /dev/null Otherwise, -oLOGFILE may end up using one of them. This conflicts with the previous change, which closes stdin/out in strace. * strace.c (init): If fcntl(F_GETFD) fails on stdin or stdout, sanitize them: open /dev/null and dup it until fds 0,1,2 are all used up. Signed-off-by: Denys Vlasenko <email@example.com>
This is strace -- a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor 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 send bug reports and enhancements to the strace mailing list.