Save errno in signal handler

Obtained from:	OpenBSD
MFC After:	1 week
This commit is contained in:
kris 2001-07-24 05:41:13 +00:00
parent b4254a32fe
commit e2364a508f

View File

@ -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;
}