This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/17215] [3.4 only] __basic_file<char>::close ignores errors


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]