It's thread safe in that sense that several processes
(LE enclaves) running in parallel each get their own
instance of the WSA, so there is no mixing of static
variables in this case.
Of course, if you use other variants of multi-threading
which don't involve separate (that is, parallel) LE enclaves,
you will not get separate WSAs for each of the parallel "threads".
Kind regards
Bernd
Am 20.06.2017 um 14:16 schrieb David Crayford:
That's not what I meant. It's not thread safe without locking. And
even if you're not multi-threaded it may be better practice to copy
the static C string into a buffer. Take strerror() for example. Once
you've got the error you either print it immediately or copy the
message into a buffer. strerror_r() is much better but still has the
issue that your target buffer may be too small. Some platforms have
macros that define the maximum length of a message returned from
strerror(). IMO returning static C strings is bad practice and should
be avoided when there are better alternatives.
On 20/06/2017 7:12 PM, Don Poitras wrote:
Not if you compile RENT. In that case the static is allocated in a
separate
area rather than being inside the load module.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN