diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-01-12 22:36:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-01-12 22:36:39 +0000 |
commit | 0b62f5dc36fc7203a74cdc812c4234ae188fdfd2 (patch) | |
tree | ecc7fabf3378a0d4a5e51b04cc05b96a30b1a897 /usr.bin/tip/cmds.c | |
parent | 06695dd40a362c99551ceac34895de8a73998060 (diff) |
save errno wrapping in a signal handler
Diffstat (limited to 'usr.bin/tip/cmds.c')
-rw-r--r-- | usr.bin/tip/cmds.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tip/cmds.c b/usr.bin/tip/cmds.c index af8ffdceaa3..d17bd53682b 100644 --- a/usr.bin/tip/cmds.c +++ b/usr.bin/tip/cmds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmds.c,v 1.30 2009/12/12 18:13:59 nicm Exp $ */ +/* $OpenBSD: cmds.c,v 1.31 2010/01/12 22:36:38 deraadt Exp $ */ /* $NetBSD: cmds.c,v 1.7 1997/02/11 09:24:03 mrg Exp $ */ /* @@ -453,8 +453,12 @@ tryagain: void timeout(int signo) { + int saved_errno = errno; + signal(SIGALRM, timeout); timedout = 1; + + errno = saved_errno; } /* |