From 5007eafa5e5d88991afbd6e7232ca37cf608149b Mon Sep 17 00:00:00 2001 From: Kris Kennaway Date: Tue, 24 Jul 2001 05:41:13 +0000 Subject: [PATCH] Save errno in signal handler Obtained from: OpenBSD MFC After: 1 week --- libexec/talkd/talkd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index ca30ef725f13..551fd5b3be91 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -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; }