projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trattate anche {{{vmslice}}} e {{{tee}}}, e scritto esempio di
[gapil.git]
/
listati
/
splicecp.c
diff --git
a/listati/splicecp.c
b/listati/splicecp.c
index 28a6705df7122c82d9f163ff69d2283cf883eb44..0da067bc9c953e5258deed07475e496b6b4dd50c 100644
(file)
--- a/
listati/splicecp.c
+++ b/
listati/splicecp.c
@@
-42,10
+42,9
@@
int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
exit(EXIT_FAILURE);
}
}
-
do
{
+
while (nread > 0)
{
nwrite = splice(pipefd[0], NULL, out_fd, NULL, nread,
SPLICE_F_MOVE|SPLICE_F_MORE);
nwrite = splice(pipefd[0], NULL, out_fd, NULL, nread,
SPLICE_F_MOVE|SPLICE_F_MORE);
- if (nwrite == 0) continue;
if (nwrite < 0) {
if (errno == EINTR)
continue;
if (nwrite < 0) {
if (errno == EINTR)
continue;
@@
-55,7
+54,7
@@
int main(int argc, char *argv[])
}
}
nread -= nwrite;
}
}
nread -= nwrite;
- }
while (nread);
+ }
}
return EXIT_SUCCESS;
}
}
return EXIT_SUCCESS;
}