[PATCH]: File pointer release
Thomas Pfaff
tpfaff@gmx.net
Mon Jan 19 21:01:00 GMT 2004
The FILE pointer release in fclose and freopen is not thread safe.
As soon as the FILE pointers _flag member is set to 0 the FILE pointer
can be reused by other threads. This can be avoided by resetting the
_flag member as the final operation.
Thomas
2004-01-19 Thomas Pfaff <tpfaff@gmx.net>
* libc/stdio/fclose.c (fclose): Release FILE as the last step.
* libc/stdio/freopen.c (freopen): Ditto.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20040119/e1d72b58/attachment.ksh>
More information about the Newlib
mailing list