This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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]

Re: [PATCH]: File pointer release


Patch checked in. Thanks.

-- Jeff J.

Thomas Pfaff wrote:

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.




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