Date: Sat, 20 May 2000 18:02:29 -0700 From: Arun Sharma <adsharma@sharmas.dhs.org> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: truss(1) with support for fork(2) and friends Message-ID: <20000520180228.A4383@sharmas.dhs.org>
next in thread | raw e-mail | index | archive | help
I just implemented the "-f" flag in truss, to trace across fork(2), rfork(2) and vfork(2) (the last one is not tested). The other day I observed that there were two truss processes when I was running "truss -f" on a Solaris box. I just thought it was a much simpler way of implementing "-f" than the strace (on Linux) way. So the implementation forks truss itself for each fork of the process being traced. It seems to work well for the most part, except for a race condition. The race condition happens because the child process could have gone away before the child truss could attach to it. Any suggestions to fix the race would be highly appreciated. I'm guilty of running indent against the source, before I did this work. So I can't generate a clean patch yet. But if I get good feedback on this work, I'll clean it up and produce a patch that can be commited. The tar ball is at: http://sharmas.dhs.org/~adsharma/projects/freebsd/truss.tar.gz This work could be useful to those of you thinking about implementing threads using rfork. -Arun To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000520180228.A4383>