]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2001/06/16 08:57:35
authormouring <mouring>
Thu, 21 Jun 2001 03:08:58 +0000 (03:08 +0000)
committermouring <mouring>
Thu, 21 Jun 2001 03:08:58 +0000 (03:08 +0000)
     [scp.c]
     no stdio or exit() in signal handlers.

ChangeLog
scp.c

index 48614a0c4ed945750c61cc0279e13dcdb124392b..8c955346493b773bb6da2c61183a99bf6489c47f 100644 (file)
--- 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
diff --git a/scp.c b/scp.c
index 168512c4b0e8faca1e0adc3379b7c7f0f8628c15..2ca48dd57a554fbca2fd8121597627a0c56bcfc9 100644 (file)
--- 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);
 }
 
 
This page took 0.058765 seconds and 5 git commands to generate.