diff options
author | 2000-10-18 18:23:02 +0000 | |
---|---|---|
committer | 2000-10-18 18:23:02 +0000 | |
commit | 7fa0ca9914b21fedc6c1a53ee41fb0596e718491 (patch) | |
tree | d526eabe261c5156eabc1623236a490434b07454 /usr.bin/ssh/scp.c | |
parent | undo (diff) | |
download | wireguard-openbsd-7fa0ca9914b21fedc6c1a53ee41fb0596e718491.tar.xz wireguard-openbsd-7fa0ca9914b21fedc6c1a53ee41fb0596e718491.zip |
replace atomicio(read,...) with read(); ok deraadt@
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r-- | usr.bin/ssh/scp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index 119080a5cdc..a412b8d92f2 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -75,7 +75,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.42 2000/10/14 10:07:21 markus Exp $"); +RCSID("$OpenBSD: scp.c,v 1.43 2000/10/18 18:23:02 markus Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -828,8 +828,10 @@ bad: run_err("%s: %s", np, strerror(errno)); amt = size - i; count += amt; do { - j = atomicio(read, remin, cp, amt); - if (j <= 0) { + j = read(remin, cp, amt); + if (j == -1 && (errno == EINTR || errno == EAGAIN)) { + continue; + } else if (j <= 0) { run_err("%s", j ? strerror(errno) : "dropped connection"); exit(1); |