Save errno in signal handler
Obtained from: OpenBSD MFC After: 1 week
This commit is contained in:
parent
b4254a32fe
commit
e2364a508f
@ -132,8 +132,10 @@ main(argc, argv)
|
||||
void
|
||||
timeout()
|
||||
{
|
||||
int save_errno = errno;
|
||||
|
||||
if (time(0) - lastmsgtime >= MAXIDLE)
|
||||
_exit(0);
|
||||
alarm(TIMEOUT);
|
||||
errno = save_errno;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user