diff options
author | kris <kris@FreeBSD.org> | 2001-07-24 05:41:13 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-07-24 05:41:13 +0000 |
commit | e2364a508ff5d03a84eb5aebb0371980cc4a340e (patch) | |
tree | 72e148a2ae2addad51b4653190ec23f3c61b1d90 /libexec | |
parent | b4254a32fe151ca1572b9b2e7684282f5325ef0c (diff) | |
download | FreeBSD-src-e2364a508ff5d03a84eb5aebb0371980cc4a340e.zip FreeBSD-src-e2364a508ff5d03a84eb5aebb0371980cc4a340e.tar.gz |
Save errno in signal handler
Obtained from: OpenBSD
MFC After: 1 week
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/talkd/talkd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index ca30ef7..551fd5b 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; } |