diff options
author | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:22:52 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2007-12-02 23:22:52 +1100 |
commit | 06321f5d1d328649913a1ee468d59149974e708f (patch) | |
tree | 602da7b5ef874fe40567b814c86f75c64baf376d /ssh.c | |
parent | e143f062ba1ee0d38c583acd6a8fbc8e679f45a3 (diff) |
- deraadt@cvs.openbsd.org 2007/11/03 02:03:49
[ssh.c]
avoid errno trashing in signal handler; ok dtucker
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.307 2007/11/03 02:00:32 dtucker Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.308 2007/11/03 02:03:49 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1294,8 +1294,12 @@ control_client_sighandler(int signo) | |||
1294 | static void | 1294 | static void |
1295 | control_client_sigrelay(int signo) | 1295 | control_client_sigrelay(int signo) |
1296 | { | 1296 | { |
1297 | int save_errno = errno; | ||
1298 | |||
1297 | if (control_server_pid > 1) | 1299 | if (control_server_pid > 1) |
1298 | kill(control_server_pid, signo); | 1300 | kill(control_server_pid, signo); |
1301 | |||
1302 | errno = save_errno; | ||
1299 | } | 1303 | } |
1300 | 1304 | ||
1301 | static int | 1305 | static int |