Re: [EXIM] Odd trace of exim -bd -qq20s

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Malcolm Beattie
CC: exim-users
Subject: Re: [EXIM] Odd trace of exim -bd -qq20s
On Thu, 27 May 1999, Malcolm Beattie wrote:

> That's the solution I came up with and I'd call it "elegant"
> rather than "dirty" :-) The O/S keeps track of the reference
> counting for you however many processes you fire off (or a
> process can close the descriptor if it doesn't want to participate
> provided you pass it the descriptor number). When the very last
> process involved dies, the O/S guarantees to let you know by
> unblocking your select or else you can choose to have it send you a
> SIGIO if you want to be notified asynchronously.


I have investigated the two suggestions. It turns out the process groups
are a red herring because a process can only wait for its immediate
children (even using a process group id instead of an explicit pid), not
its grandchildren or remoter generations.

However, doing the pipe trick is indeed simple and works well. I just
had to make sure it didn't get closed by mistake. I have in fact just
written a read() rather than a select() - it blocks until the pipe
vanishes. If there's a guru who knows why this is wrong, please let me
know.

Thanks for the suggestions.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***