OSProcess -OS-X and a unix issue...
Joern Eyrich
Joern.Eyrich at syngenio.de
Thu Mar 7 13:59:52 UTC 2002
Hi,
I'm neither an export on unix intricacies nor on osprocess, but I won't spare you my comments anyway... ;-)
John M McIntosh wrote:
> Actually it's there because the Smalltalk code is checking to see if
> the pid is valid. It also does this because if you save an image and
> restart then we need to confirm if the pids we think we have in the
> squeak code actually exist or not.
Hm, I would prefer to invalidate the list of remembered pids on image startup. even if there is a process with this id, you don't really know if it's the same process. and even if it is,
a) if the image-saving-squeak has been terminated in the meantime, the child process is bound to have been reparented to init and squeak wouldn't get a SIGCHLD anyway, would it?
b) if the image-saving-squeak is still running, now two squeaks will think it's their child process, which seems of dubious usefulness to me
I'm not sure I understand why you are looking for the death of a specific child, though; I can't look at the code, I've only found UnixOSProcessPlugin.c on minnow, and if I download it, it's corrupt...
To me, Richard's suggestion looks ok.
If you really have to get the pid info, however, maybe the sources to Darwin's 'ps' command will give a clue:
http://www.opensource.apple.com/cgi-bin/registered/cvs/Commands/NeXT/adv_cmds/ps.tproj/
Joern
More information about the Squeak-dev
mailing list
|