diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-07-13 23:19:32 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-07-13 23:19:32 +0000 |
commit | 52c251848d3e688cbaa888abe16286bc26a51aad (patch) | |
tree | 683df7ca83d88d82f5bb42ac6575f5c143350220 /usr.bin/ssh/scp.c | |
parent | fac8ea942fa9791a6c2ba5bc58ad5ef49d986d34 (diff) |
close can fail on AFS, report error; from Greg Hudson <ghudson@mit.edu>
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index c0874a65ef5..e0015bb9817 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -45,7 +45,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $"); +RCSID("$OpenBSD: scp.c,v 1.33 2000/07/13 23:19:31 provos Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -881,7 +881,10 @@ bad: run_err("%s: %s", np, strerror(errno)); run_err("%s: set mode: %s", np, strerror(errno)); } - (void) close(ofd); + if (close(ofd) == -1) { + wrerr = YES; + wrerrno = errno; + } (void) response(); if (setimes && wrerr == NO) { setimes = 0; @@ -1005,7 +1008,7 @@ run_err(const char *fmt,...) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: scp.c,v 1.32 2000/06/20 01:39:44 markus Exp $ + * $OpenBSD: scp.c,v 1.33 2000/07/13 23:19:31 provos Exp $ */ char * |