------- Comment #5 from sebor at roguewave dot com 2008-02-13 16:37 -------
I understand that POSIX requires the signal but I'm not sure I see what that
has to do with filebuf. C++ specifies that filebuf member functions behave
"as if" by calling the C stdio functions.
See 27.8.1, p2:
In this subclause, the type name FILE refers to the type FILE declared in
<cstdio>.
A File provides an external source/sink stream whose underlaid character
type is char (byte).
and 27.8.1.4, the description of filebuf::open():
It then opens a file, if possible, whose name is the NTBS s (as if by
calling std::fopen(s, modstr))
There is no mention in the C++ standard of filebuf calling POSIX write(),
and while I agree that doing so makes sense (our own implementation does
it), strictly speaking it doesn't seem to be allowed by the "as if" clause.
In addition, I don't think exposing C++ programs to signals as a result is
desirable. So it seems that a conforming implementation of filebuf that
chooses to use POSIX I/O needs to suspend signals while making POSIX calls
that might lead to signals.
If you disagree and think the C++ standard permits this behavior could you
point to the relevant wording?
--
sebor at roguewave dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35176