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
|