
This is interesting, but not what I want. I want something to wait on a real, Posix, child, _process_!! Not a GHC thread.
Ah. Oops :) There's one other way that Marcin didn't mention: wait for SIGCHLD, which can be done without blocking the whole process. Unfortunately there's no easy way at the moment to tell *which* child generated the SIGCHLD. I guess we should really have a process wait as a threading primitive, like OCaml does. I've been looking at FreeBSD's `kevent' stuff recently - they have a really nice way to wait for several different types of event, including file descriptors, processes and even when a file is modified (eg. tail -f). Does Linux or Solaris have anything like this? I had a quick look around but didn't find anything. Cheers, Simon

"Simon Marlow"
I've been looking at FreeBSD's `kevent' stuff recently - they have a really nice way to wait for several different types of event, including file descriptors, processes and even when a file is modified (eg. tail -f). Does Linux or Solaris have anything like this? I had a quick look around but didn't find anything.
Linus doesn't seem to be in favour of the approach as at the
end of
http://kt.linuxcare.com/kernel-traffic/kt20001113_93.epl#1
he writes
I've actually read the BSD kevent stuff, and I think it's
classic over-design. It's not easy to see what it's all about,
and the whole
participants (2)
-
Manuel M. T. Chakravarty
-
Simon Marlow