summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-03 02:03:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-11-03 02:03:50 +0000
commitddae29c01eb4e0e853ae63511be8ac0f0bc0f512 (patch)
treec7521d15b0fef952528fae4c73f7c65f8b9b87a9 /usr.bin/ssh
parent2392c357d3e598b6bc8031954cc031ae6c933a42 (diff)
avoid errno trashing in signal handler; ok dtucker
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 71b837b7822..1623b76dbcb 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.307 2007/11/03 02:00:32 dtucker Exp $ */
+/* $OpenBSD: ssh.c,v 1.308 2007/11/03 02:03:49 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1274,8 +1274,12 @@ control_client_sighandler(int signo)
static void
control_client_sigrelay(int signo)
{
+ int save_errno = errno;
+
if (control_server_pid > 1)
kill(control_server_pid, signo);
+
+ errno = save_errno;
}
static int