summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-10-18 18:23:02 +0000
committermarkus <markus@openbsd.org>2000-10-18 18:23:02 +0000
commit7fa0ca9914b21fedc6c1a53ee41fb0596e718491 (patch)
treed526eabe261c5156eabc1623236a490434b07454
parentundo (diff)
downloadwireguard-openbsd-7fa0ca9914b21fedc6c1a53ee41fb0596e718491.tar.xz
wireguard-openbsd-7fa0ca9914b21fedc6c1a53ee41fb0596e718491.zip
replace atomicio(read,...) with read(); ok deraadt@
-rw-r--r--usr.bin/ssh/scp.c8
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);