> Why not have the parent call setsid() / setpgid() at the beginning?
IIRC, odd things happen if a GUI app is not in the Login Window's process
group...
--
Scott Ribe
scott_r...@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice
___
Co
Why not have the parent call setsid() / setpgid() at the beginning? This
should prevent the PID from getting recycled until every process in the process
group exits.
Julian Hsiao
mad...@nyanisore.net
On Apr 2, 2010, at 8:10 PM, Michael Ash wrote:
> On Thu, Apr 1, 2010 at 7:19 PM, Dave Keck w
> Call getppid, set up the kevent listener, then before you actually
> block in kevent, call getppid *again*. If the answer matches the first
> call, then you can go ahead and call kevent. If the answer doesn't
> match, you've hit the race condition you outline here, your parent is
> dead, and you
On Thu, Apr 1, 2010 at 7:19 PM, Dave Keck wrote:
>>> Look like a race condition. The man page says getppid() will not fail, but
>>> not what happens after the parent dies. I will test this.
>>
>> If the parent dies, the process becomes the child of launchd. For a quick
>> fix I checked for the par
>> Look like a race condition. The man page says getppid() will not fail, but
>> not what happens after the parent dies. I will test this.
>
> If the parent dies, the process becomes the child of launchd. For a quick
> fix I checked for the parent PID greater than 1.
>
> A better fix, the parent pr
On Mar 31, 2010, at 9:13 AM, John Harte wrote:
What does getppid() returns if the parent dies before the child
reach this point ?
Look like a race condition. The man page says getppid() will not
fail, but not what happens after the parent dies. I will test this.
If the parent dies,
On Mar 31, 2010, at 4:28 AM, Jean-Daniel Dupas wrote:
>
> What does getppid() returns if the parent dies before the child reach this
> point ?
>
Look like a race condition. The man page says getppid() will not fail, but not
what happens after the parent dies. I will test this.
Thanks
John
Look at the sources. It uses kevent. (man kevent)
Le 31 mars 2010 à 14:24, McLaughlin, Michael P. a écrit :
> How does WatchForTermination() do its watching? Is it constantly polling?
> That would be a performance-killer.
>
>
> On 3/30/10 11:18 PM, "John Harte" wrote:
>
>
>
> On Mar 30,
How does WatchForTermination() do its watching? Is it constantly polling?
That would be a performance-killer.
On 3/30/10 11:18 PM, "John Harte" wrote:
On Mar 30, 2010, at 4:01 PM, McLaughlin, Michael P. wrote:
> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
Le 31 mars 2010 à 05:18, John Harte a écrit :
>
> On Mar 30, 2010, at 4:01 PM, McLaughlin, Michael P. wrote:
>
>> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
>> (since threads are not sufficient in this case). Currently, I terminate
>> these subtasks via the ap
On Mar 30, 2010, at 4:01 PM, McLaughlin, Michael P. wrote:
> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
> (since threads are not sufficient in this case). Currently, I terminate
> these subtasks via the app-delegate method
>
> -(NSApplicationTerminateReply)appl
On Mar 30, 2010, at 4:01 PM, McLaughlin, Michael P. wrote:
> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
> (since threads are not sufficient in this case). Currently, I terminate
> these subtasks via the app-delegate method
>
> -(NSApplicationTerminateReply)appl
On Mar 30, 2010, at 1:01 PM, McLaughlin, Michael P. wrote:
> I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
> (since threads are not sufficient in this case). Currently, I terminate
> these subtasks via the app-delegate method
>
> -(NSApplicationTerminateReply)applic
Hi Mike.
How about having the main app periodically post a notification via
NSDistributedNotificationCenter? The subtasks can observe the notification and
terminate themselves if they don't receive one for some period of time.
-Jeff
On Mar 30, 2010, at 3:01 PM, McLaughlin, Michael P. wrote:
I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
(since threads are not sufficient in this case). Currently, I terminate
these subtasks via the app-delegate method
-(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication
*)sender
This works provided one
15 matches
Mail list logo