save and restore errno in signal handler

master
Marc Alexander Lehmann 16 years ago
parent 8eec05e736
commit 067f5b68b5

@ -415,8 +415,10 @@ sighandler (int signum)
if (!gotsig)
{
int old_errno = errno;
gotsig = 1;
write (sigpipe [1], &signum, 1);
errno = old_errno;
}
}

Loading…
Cancel
Save