Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: waitid() function replacement



Ya, sorry 'bout that. We don't have an ETA we can talk about yet at the moment though.

Once again, our apologize.

davez

On Apr 5, 2006, at 5:35 PM, Kevin Harris wrote:

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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >waitid() function replacement (From: "Kevin Harris" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.