I didn’t notice the ‘-ff’ option of strace until I came across it today. By turning it on, not only fork(2)s can be followed, but also each process’s trace will be written to tracefile.pid, where pid is the process id of each process. Typical usage might look like this:
# strace -o tracelog.txt -ff -T command
This option can be quite handy, when debugging programs that spawn child processes.