mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
214 B
12 lines
214 B
#include <signal.h>
|
|
|
|
int siginterrupt(int sig, int flag)
|
|
{
|
|
struct sigaction sa;
|
|
|
|
sigaction(sig, 0, &sa);
|
|
if (flag) sa.sa_flags &= ~SA_RESTART;
|
|
else sa.sa_flags |= SA_RESTART;
|
|
|
|
return sigaction(sig, &sa, 0);
|
|
}
|
|
|