9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] waiting for dead procs with libthread
@ 2005-11-03 17:54 Fco. J. Ballesteros
  2005-11-03 17:58 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Fco. J. Ballesteros @ 2005-11-03 17:54 UTC (permalink / raw)
  To: 9fans

Just wondering. Why is it that proccreate/rfork use RFNOWAIT?
The result is that you can't use threadwaitchan() to learn of
procs created (for things other than exec) that died.

thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] waiting for dead procs with libthread
  2005-11-03 17:54 [9fans] waiting for dead procs with libthread Fco. J. Ballesteros
@ 2005-11-03 17:58 ` Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2005-11-03 17:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Just wondering. Why is it that proccreate/rfork use RFNOWAIT?
> The result is that you can't use threadwaitchan() to learn of
> procs created (for things other than exec) that died.

Just have them send you a message on a channel before
they exit.  Threadwaitchan() exists only because exec'ed
programs can't do that for themselves.

Russ


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] waiting for dead procs with libthread
  2005-11-03 18:01 Fco. J. Ballesteros
@ 2005-11-03 18:18 ` Russ Cox
  0 siblings, 0 replies; 4+ messages in thread
From: Russ Cox @ 2005-11-03 18:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Your own procs can't do that either if they die. Right?
> Or perhaps the argument was that in that case it doesn't matter?

If one proc dies unexpectedly, your program is now in an
inconsistent state (maybe it was holding some locks;
maybe it was in the middle of editing some data
structure; etc.) and you are screwed anyway.

Russ


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] waiting for dead procs with libthread
@ 2005-11-03 18:01 Fco. J. Ballesteros
  2005-11-03 18:18 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Fco. J. Ballesteros @ 2005-11-03 18:01 UTC (permalink / raw)
  To: 9fans

Your own procs can't do that either if they die. Right?
Or perhaps the argument was that in that case it doesn't matter?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-03 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-03 17:54 [9fans] waiting for dead procs with libthread Fco. J. Ballesteros
2005-11-03 17:58 ` Russ Cox
2005-11-03 18:01 Fco. J. Ballesteros
2005-11-03 18:18 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).