From: Jens Axboe Date: Mon, 10 Jul 2006 19:55:38 +0000 (-0700) Subject: [PATCH] ktee: don't use SPLICE_F_NONBLOCK X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=9ed9566dd5aaff12eea56d882a38fcce48e00461;p=splice.git [PATCH] ktee: don't use SPLICE_F_NONBLOCK We cannot reliably detect when to quit in that case, so just always block. --- diff --git a/ktee-net.c b/ktee-net.c index 3ae2529..7f2653b 100644 --- a/ktee-net.c +++ b/ktee-net.c @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) return error("connect"); do { - int tee_len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); + int tee_len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, 0); if (tee_len < 0) { if (errno == EAGAIN) { diff --git a/ktee.c b/ktee.c index ebe9d92..06a1e4c 100644 --- a/ktee.c +++ b/ktee.c @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) return error("open output"); do { - int tee_len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); + int tee_len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, 0); if (tee_len < 0) { if (errno == EAGAIN) {