From time to time various kernels, old and new, just go nuts and fail attach-p-cmd.test with the following diagnostics: 12345 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} --- -12345 chdir("attach-p-cmd.test -p") = -1 ENOENT (No such file or directory) +12345 syscall_4294967295(0xffe60934, 0x1c0, 0xffe60934, 0x1, 0xffe609b4, 0xffe60a58) = -1 (errno 38) +12345 chdir("attach-p-cmd.test -p") = -1 ENOSYS (Function not implemented) Let's workaround this kernel madness by rewriting the test without use of SIGALRM. * tests/attach-p-cmd.h: New file. * tests/Makefile.am (EXTRA_DIST): Add attach-p-cmd.h. * tests/attach-p-cmd-cmd.c: Include "attach-p-cmd.h". (write_pidfile, wait_for_peer_invocation): New functions. (main): Use them. * tests/attach-p-cmd-p.c: Include <time.h> and "attach-p-cmd.h". (wait_for_peer_invocation, wait_for_peer_termination): New functions. (main): Use them. Do not raise SIGALRM, use nanosleep after peer termination.
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.
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.sourceforge.net. The mailing list archives are available at https://sourceforge.net/p/strace/mailman/strace-devel/ and other archival sites.