On Sat, Oct 26, 2013 at 11:38 AM, Donn Cave <donn@avvanta.com> wrote:
Question about the syscall trace -- in the second, threaded version,

> [pid 11612] fcntl(7, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = 0
...
> [pid 11612] +++ exited with 0 +++

?? In the not threaded version, I don't see the child process exit - and
wasn't expecting to, since it's supposed to have exec'd to /usr/bin/sleep.

You don't see it in the non-threaded one because the parent throws an exception while setting the lock and exits first. The sleep is only 5 seconds, so the second one reaches waitForProcess and collects it (note that the "parent: fail!" is a putStrLn, not an error) before exiting.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net