waitid() function replacement
waitid() function replacement
- Subject: waitid() function replacement
- From: "Kevin Harris" <email@hidden>
- Date: Wed, 5 Apr 2006 18:35:53 -0600
I have hit a problem where I need to use waitid() to wait for a process. I'm hoping someone can provide me with some information about a workaround for Darwin. Searching through the list archives didn't show anything useful, nor did my googles.
Here's my situation:
My program spawns processes and needs to be able to signal (for termination purposes, if they don't quit on their own) the process as well as any other process it has started (within the same process group). It is not possible to use waitpid() on the process (or process group), if the process has quit, as it will then become unsafe to send a term or kill signal to that process group. This is because of a potential race condition where another process may have started with the same PID.
On other platforms, I am able to do a waitid() with the WNOWAIT option, which will keep the process active so it remains safe to send a signal to the entire process group. The process group remains active with a member that needs waiting, even if it didn't spawn any processes.
I have noticed that the headers have waitid(), but there is no symbol present in any of the libraries on my system (10.4). My 10.3 system doesn't have the function listed in the headers at all.
Any help will be appreciated.
Thank you for your time.
-Kevin-
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden