Usage of strerror in

Andrew Haley
Mon Oct 20 14:12:00 GMT 2003

Mark Wielaard writes:
 > Hi,
 > While reading I noticed the use of strerror(). Is
 > this funtion thread save?


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


More information about the Java mailing list