[scp.c]
     no stdio or exit() in signal handlers.
This commit is contained in:
Ben Lindstrom 2001-06-21 03:08:58 +00:00
parent 83417a86da
commit 738f51e3df
2 changed files with 10 additions and 4 deletions

View File

@ -6,6 +6,9 @@
- markus@cvs.openbsd.org 2001/06/16 08:50:39 - markus@cvs.openbsd.org 2001/06/16 08:50:39
[channels.h] [channels.h]
bad //-style comment; thx to stevev@darkwing.uoregon.edu 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 20010615
- (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL - (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
@ -5658,4 +5661,4 @@
- Wrote replacements for strlcpy and mkdtemp - Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1 - 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 $

9
scp.c
View File

@ -75,7 +75,7 @@
*/ */
#include "includes.h" #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 "xmalloc.h"
#include "atomicio.h" #include "atomicio.h"
@ -1052,8 +1052,11 @@ lostconn(signo)
int signo; int signo;
{ {
if (!iamremote) if (!iamremote)
fprintf(stderr, "lost connection\n"); write(STDERR_FILENO, "lost connection\n", 16);
exit(1); if (signo)
_exit(1);
else
exit(1);
} }