Use ptrace(2) LWP events to track threads reliably in truss.
- truss can now log the system call invoked by a thread during a voluntary process exit. No return value is logged, but the value passed to exit() is included in the trace output. Arguments passed to thread exit system calls such as thr_exit() are not logged as voluntary thread exits cannot be distinguished from involuntary thread exits during a system call.
- New events are now reported for thread births and exits similar to the recently added events for new child processes when following forks.
I had originally included this with the truss -H changes, so you've seen
this before (modulo a few comment cleanups and dropping support for trying
to log thr_exit()).