提交 6894f847 编写于 作者: R Rich Felker

fix spurious EINTR errors from multithreaded set*id, etc.

commit 78a8ef47 inadvertently removed
the SA_RESTART flag from the sigaction for the internal signal handler
used by __synccall for broadcasting. as a result, programs which did
not use interrupting signals but which used set*id() in a
multithreaded context could wrongly observe EINTR errors they're not
prepared to handle.
上级 1f53e7d0
...@@ -50,7 +50,7 @@ void __synccall(void (*func)(void *), void *ctx) ...@@ -50,7 +50,7 @@ void __synccall(void (*func)(void *), void *ctx)
int cs, i, r, pid, self;; int cs, i, r, pid, self;;
DIR dir = {0}; DIR dir = {0};
struct dirent *de; struct dirent *de;
struct sigaction sa = { .sa_flags = 0, .sa_handler = handler }; struct sigaction sa = { .sa_flags = SA_RESTART, .sa_handler = handler };
struct chain *cp, *next; struct chain *cp, *next;
struct timespec ts; struct timespec ts;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册