summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-01-26 18:19:10 +0000
committerJim Meyering <jim@meyering.net>1994-01-26 18:19:10 +0000
commit5629153f1eadc2b27dd48ff18a194f6819d9d732 (patch)
tree60428c4cc180a9940e5d85ae62154f60dfde43f1 /src/dd.c
parent2b16e3652c9625a41bbe9a1573316a5c1e65141b (diff)
downloadcoreutils-5629153f1eadc2b27dd48ff18a194f6819d9d732.tar.xz
.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dd.c b/src/dd.c
index 971d7eb73..1da5e177f 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -110,6 +110,7 @@
char *xmalloc ();
void error ();
+int safe_read ();
static RETSIGTYPE interrupt_handler ();
static int bit_count ();
@@ -446,7 +447,11 @@ skip (fdesc, file, records, blocksize, buf)
{
while (records-- > 0)
{
- if (read (fdesc, buf, blocksize) < 0)
+ if (read (fdesc, buf, blocksize) < 0
+#ifdef EINTR
+ && errno != EINTR
+#endif
+ )
{
error (0, errno, "%s", file);
quit (1);
@@ -563,7 +568,7 @@ copy ()
if ((conversions_mask & C_SYNC) && (conversions_mask & C_NOERROR))
bzero (ibuf, input_blocksize);
- nread = read (input_fd, ibuf, input_blocksize);
+ nread = safe_read (input_fd, ibuf, input_blocksize);
if (nread == 0)
break; /* EOF. */