Linux System Programming note 1

来源:互联网 发布:怎么样修改淘宝会员名 编辑:程序博客网 时间:2024/05/22 14:15
1.
#include  <string.h>
char * strerror(int errnum);
AND
#include <string.h>
int strerror_r(int errnum, char *buf, size_t len);
former:not thread-safe
latter:thread-safe
2.
In single-threaded programs, errno is a global variable.
In multithreaded programs, however, errno is stored per-thread, and is thus thread-safe.
0 0
原创粉丝点击