blob: 387d24dd8a01a8387eeb3bb1e1965e035c875268 [file] [log] [blame]
Igor Sarkisov90628a22020-10-06 12:02:06 -07001Even though SVR4 has truss, you may prefer using strace for a number
2of reasons. Not the least of which are portability and source code.
3
4The main event loop is awkward on systems for which procfs isn't
5pollable. I think a pollable procfs is a Solaris invention so most SVR4
6systems have this weakness. On Solaris, strace runs as a single
7controlling process. This is a big improvement if you are debugging a
8lot of processes at once.
9
10There is no thread support but it wouldn't be very difficult to add it.
11
12On UnixWare using the -f option to follow forked children sometimes shows
13many "unfinished" system calls as strace bounces between each runnable child.
14A crude workaround for this is available by adding
15
16 #define POLL_HACK 1
17
18to the config.h file. This forces strace to check whether the last process
19has finished a system call before polling other processes for events.
20
21Wichert Akkerman <wakkerma@debian.org>