strerror_r() between fork and exec?
Steven Stewart-Gallus
sstewartgallus00@mylangara.bc.ca
Tue Sep 9 18:07:00 GMT 2014
Hello, as you can see in the manual (at
http://www.gnu.org/software/libc/manual/html_mono/libc.html#index-strerror_005fr)
strerror_r is not safe in such a situation. The usual trick in such a
situation is to use a pipe to report back the error code to the
parent. If you really cannot use such a trick then one hack you might
be able to do is to fork an initial zygote process from before you
start using multithreaded functions and then spawn off forks of that
process instead of your latest one. These are just a few potential
approaches though and I would need to more about your particular
situation before I could give you better help.
Thank you,
Steven Stewart-Gallus
More information about the Libc-help
mailing list