This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/17215] [3.4 only] __basic_file<char>::close ignores errors
- From: "ken at xorian dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Sep 2004 18:09:42 -0000
- Subject: [Bug libstdc++/17215] [3.4 only] __basic_file<char>::close ignores errors
- References: <20040827180411.17215.ken@xorian.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ken at xorian dot net 2004-09-02 18:09 -------
Unfortunately, I haven't had much luck with generating a "real" EINTR.
I've tried various methods (such as forking a separate process that
sits in a loop killing the main process with a signal whose handler
does nothing), but I haven't come up with a method that works.
The way I noticed it originally was with a method for "faking" EINTR.
I'll attach the single C file (fake_eintr.c) which can be compiled
into a shared library like so:
gcc -shared -o fake_eintr.so fake_eintr.c -ldl -lc
And used as an LD_PRELOAD (on Linux at least). This is, however,
unsatisfying as a method of testing this as it doesn't reflect state
changes that would happen inside the C run-time library when a real
EINTR occurs. (For example, ferror(3) would return false after a
faked EINTR from my flose(3) wrapper.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17215