Email List: Xaustin-group-lX
[All Lists]

Re: [Fwd: Re: whether ext() and atexit() are safe w.r.t each other

To: austin-group-l@xxxxxxxxxxxxx
Subject: Re: [Fwd: Re: whether ext() and atexit() are safe w.r.t each other
From: Geoff Clare <gwc@xxxxxxxxxxxxx>
Date: Mon, 9 Jun 2008 12:35:05 +0100
References: <1212759114.12557.52.camel@localhost.localdomain> <20080606154514.GB39160@finch-staff-1.thus.net> <48496905.2050606@hp.com> <20080609075139.GC74480@finch-staff-1.thus.net> <20080609085814.GA23187@squonk.masqnet> <484CFFA2.6000701@hp.com>
David Butenhof <david.butenhof@hp.com> wrote, on 09 Jun 2008:
>
> Geoff Clare wrote:
> >Clive D.W. Feather <clive@demon.net> wrote, on 09 Jun 2008:
> >  
> >>Dave Butenhof said:
> >>    
> >>>Except that here we're talking about synchronization between two
> >>>concurrently executing threads. It IS possible for atexit() to be
> >>>invoked after exit() starts, but not from another atexit handler -- it's
> >>>called from another thread.
> >>>      
> >>Ah. Threads.
> >>
> >>Okay, just ignore me.
> >>    
> >Actually, I thought you had a valid point, which Dave doesn't
> >seem to have taken into account.
> >  
> What?
> 
> I was NOT trying to re-state the issue from scratch. I was merely 
> explaining the hole in his logic.
> >Dave said:
> >
> >| Except that here we're talking about synchronization between two
> >| concurrently executing threads. It IS possible for atexit() to be
> >| invoked after exit() starts, but not from another atexit handler -- it's
> >| called from another thread.
> >
> >Perhaps he meant to say "but not only from another atexit handler", but
> >without the "only" this suggests that he thinks atexit handlers are not
> >allowed to call atexit(), when in fact they are.
> >  
> You're over-analyzing a simple statement and ignoring the context. I was 
> never claiming to re-state the general POSIX rule from scratch. In 
> response to a specific statement that atexit() can be called after 
> exit() only from an atexit() handler, I pointed out that it can in fact 
> be called after exit() but not from an atexit() handler. This is a 
> simple, direct, and correct statement.

Maybe it's a US v. UK cultural thing, but to me "It IS possible for
atexit() to be invoked after exit() starts, but not from another
atexit handler -- it's called from another thread" means "It IS
possible for atexit() to be invoked after exit() starts, but it is
not possible from another atexit handler -- it's called from another
thread".  Hence my comment about a possible missing "only".

Anyway, I'm glad you didn't mean what I thought you meant.

-- 
Geoff Clare <g.clare@opengroup.org>
The Open Group, Thames Tower, Station Road, Reading, RG1 1LX, England

<Prev in Thread] Current Thread [Next in Thread>