This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/22759] Test nptl/tst-stdio1 doesn't follow the latest POSIX
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 29 Jan 2018 20:38:10 +0000
- Subject: [Bug stdio/22759] Test nptl/tst-stdio1 doesn't follow the latest POSIX
- Auto-submitted: auto-generated
- References: <bug-22759-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22759
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Tulio Magno Quites Machado Filho from comment #0)
> The following paragraph was added in a recent change to POSIX:
>
> A call to exit() can block until locked streams are unlocked because a
> thread having ownership of a
> (FILE*) object blocks all function calls that reference that (FILE*)
> object (except those with names
> ending in _unlocked) from other threads, including calls to exit().
>
> Source:
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/flockfile.
> html#tag_16_146
>
> However, nptl/tst-stdio1 expects that exit() should terminate all threads
> and treats timeouts as failures.
We've had this discussion once or twice, but it should go to libc-alpha.
The behaviour you see is on purpose, in glibc exit() will exit immediately, and
this means you have a forward-progress guarantee when calling exit(). It has
been this way since at least 2004 when this behaviour was documented.
If we change this today then we may have some applications which no longer
exit() and versioning doesn't help much, the application would be recompiled
and start hanging on exit().
This needs deep discussion around what semantics we really want to use, and if
POSIX made the right choice.
--
You are receiving this mail because:
You are on the CC list for the bug.