summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-10-18 18:23:03 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-10-18 18:23:03 +0000
commit4686aa2d403703841593cafbfa4dccb96ea571d7 (patch)
tree4b203fba4b0ccc04a40090f8d580babd2040ac3e
parenta859565412f9108640ec5dd5506be5b72161f926 (diff)
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);