mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Save errno in signal handler
Obtained from: OpenBSD MFC After: 1 week
This commit is contained in:
parent
961ba1e562
commit
5007eafa5e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80248
@ -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