summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/scp.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-06-16 08:57:36 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-06-16 08:57:36 +0000
commit82bafe6039d2730662266797069c875456689cc4 (patch)
tree06ac221d9c847ed032ab3c12e50920f551a36017 /usr.bin/ssh/scp.c
parentab9a43492896778db2c2e9ff8db8fcd7ff994809 (diff)
no stdio or exit() in signal handlers.
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r--usr.bin/ssh/scp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index ad5e55cbfb4..dfeaa29df56 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -75,7 +75,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.73 2001/06/10 11:33:02 markus Exp $");
+RCSID("$OpenBSD: scp.c,v 1.74 2001/06/16 08:57:35 markus Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -1013,8 +1013,11 @@ lostconn(signo)
int signo;
{
if (!iamremote)
- fprintf(stderr, "lost connection\n");
- exit(1);
+ write(STDERR_FILENO, "lost connection\n", 16);
+ if (signo)
+ _exit(1);
+ else
+ exit(1);
}