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