summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tip/cmds.c6
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;
}
/*