From mboxrd@z Thu Jan 1 00:00:00 1970 From: pme@gcc.gnu.org To: pme@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libstdc++/2913 Date: Wed, 06 Jun 2001 16:56:00 -0000 Message-id: <20010606235602.31966.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00212.html List-Id: The following reply was made to PR libstdc++/2913; it has been noted by GNATS. From: pme@gcc.gnu.org To: donut@azstarnet.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, pme@gcc.gnu.org Cc: Subject: Re: libstdc++/2913 Date: 6 Jun 2001 23:50:17 -0000 Synopsis: iostreams ignore No space left on device condition Responsible-Changed-From-To: unassigned->pme Responsible-Changed-By: pme Responsible-Changed-When: Wed Jun 6 16:50:17 2001 Responsible-Changed-Why: I felt like it. State-Changed-From-To: open->analyzed State-Changed-By: pme State-Changed-When: Wed Jun 6 16:50:17 2001 State-Changed-Why: Thank you for your bug report. Note that "priority: high" is reserved for GCC maintainers (please read the bug-reporting instructions). With the current 3.0 branch, I get % /tmp/pme/gnatsing/a.out 0 0 1 0 0 0 1 0 % on a full device. In any case, I don't believe that testing for specific error conditions (no space left on device, drive offline, network down, disk spindle on fire, etc) is the library's responsibility. More specifically: The current default configuration passes I/O to the stdio fwrite(3) function; the only thing the C++ library knows is what fwrite(3) returns, namely, the bytes successfully written. If something goes wrong (out of space), a short count is returned. The C++ library tests for this condition (in xsputn()) and set the failbit accordingly. If the underlying filesystem doesn't do anything that would cause fwrite(3) to return an error, then the C++ library has nothing to go on. The behavior of the OS kernel and its filesystem drivers also come into play. So, I think this is not in our bailiwick, personally, but I'm leaving this PR open for others to comment. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2913&database=gcc