Wordexp() should be thread safe.
西家宜史
t-nishiie@soft.fujitsu.com
Tue Aug 7 00:31:00 GMT 2007
Hi,
I do not think that wordexp() is described clearly as
MT-unsafe on the specification.
Wordexp() is not thread safe. Because, wordexp() uses
__setenv() and __unsetenv() internally.
# grep -n setenv ./posix/wordexp.c
857: __unsetenv ("IFS");
1869: __setenv (env, value, 1);
Therefore, if a lot of wordexp() is executed at the same
time, SIGSEGV can be generated.
Example:tst-worexp2.tar.gz
Reference:
http://sourceware.org/bugzilla/show_bug.cgi?id=4887
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst-wordexp2.tar.gz
Type: application/x-gzip-compressed
Size: 827 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070807/f548867a/attachment.bin>
More information about the Libc-alpha
mailing list