Jef*_* Li 3 c unix linux posix posix-api
我知道errno是线程安全的。在Linux中,还有另外两个类似的功能,即strerror和strerror_r。根据Linux System ProgrammingRobert Lover 的书,strerror不是线程安全的,而strerror_r是线程安全的。所以我想知道perror是否是线程安全的。
Linux System Programming
oua*_*uah 5
在POSIX系统(如Linux)中,perror是线程安全的。
perror
perror 在此处未列为非线程安全的:
POSIX.1-2008的本卷定义的所有功能均应是线程安全的,但以下功能1不必是线程安全的。[...]
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
归档时间:
11 年,2 月 前
查看次数:
1240 次
最近记录: