diff --git a/ChangeLog b/ChangeLog index 23e9106f0..eceadff85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ - markus@cvs.openbsd.org 2001/06/16 08:50:39 [channels.h] bad //-style comment; thx to stevev@darkwing.uoregon.edu + - markus@cvs.openbsd.org 2001/06/16 08:57:35 + [scp.c] + no stdio or exit() in signal handlers. 20010615 - (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL @@ -5658,4 +5661,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.1290 2001/06/21 03:07:27 mouring Exp $ +$Id: ChangeLog,v 1.1291 2001/06/21 03:08:58 mouring Exp $ diff --git a/scp.c b/scp.c index 168512c4b..2ca48dd57 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); }