Usage of strerror in natFileDescriptor.cc
Andrew Haley
aph@redhat.com
Mon Oct 20 14:12:00 GMT 2003
Mark Wielaard writes:
> Hi,
>
> While reading natFileDescriptor.cc I noticed the use of strerror(). Is
> this funtion thread save?
No.
> All calls are wrapped in a JvNewStringLatin1() call so this might
> be save, but it seems there might be a small opertunity for a race
> to occur when called from two threads at the same time.
Indeed. strerror_r() exists, but it is a GNU extension. I suppose
we'd have to check for its existence.
Andrew.
More information about the Java
mailing list