diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-11 22:07:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-11 22:07:45 +0000 |
commit | 502eb17877a338e42ce952bf2793496b656e43d5 (patch) | |
tree | b20ad1d902c67af41954fcdeddd72177037e53a4 /libexec | |
parent | 8be57683c418b81c57a036612ff438bc99f85c4d (diff) |
save_errno in signal handler
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/talkd/talkd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index 42b8736482f..93016cd74ba 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: talkd.c,v 1.7 1998/07/08 19:15:19 millert Exp $ */ +/* $OpenBSD: talkd.c,v 1.8 2001/01/11 22:07:44 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)talkd.c 5.8 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: talkd.c,v 1.7 1998/07/08 19:15:19 millert Exp $"; +static char rcsid[] = "$Id: talkd.c,v 1.8 2001/01/11 22:07:44 deraadt Exp $"; #endif /* not lint */ /* @@ -129,8 +129,10 @@ main(argc, argv) void timeout() { + int save_errno = errno; if (time(0) - lastmsgtime >= MAXIDLE) _exit(0); alarm(TIMEOUT); + errno = save_errno; } |