summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-21 03:08:58 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-21 03:08:58 +0000
commit738f51e3df2f471b36abf8932ce59984daa3aa64 (patch)
tree5363cc2bd7d97942d6c90dff0647a7af3ae8515e /scp.c
parent83417a86da30b1db7acfd0650e33bcfd8f31b968 (diff)
- markus@cvs.openbsd.org 2001/06/16 08:57:35
[scp.c] no stdio or exit() in signal handlers.
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/scp.c b/scp.c
index 168512c4..2ca48dd5 100644
--- a/scp.c
+++ b/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"
@@ -1052,8 +1052,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);
}