bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pthread conformance issue with main thread


From: Samuel Thibault
Subject: Re: Pthread conformance issue with main thread
Date: Tue, 12 Nov 2013 12:42:45 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Richard Braun, le Tue 12 Nov 2013 12:02:28 +0100, a écrit :
> all diskfs translators, exit from the main thread after initialization.
> But POSIX mandates that exiting from the main thread makes the whole
> process exit too.

Uh?  It mandates that if the main() function returns, exit() is called,
and thus the whole process exits.  But if main() calls pthread_exit(),
only the thread is terminated, not the whole process.  I don't see
anything saying that it should terminate the whole process, on the
contrary: “The process shall exit with an exit status of 0 after the
last thread has been terminated.”, which implys that main() too has
called pthread_exit() to terminate itself but not the whole process.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]