[PATCH] ktee: don't use SPLICE_F_NONBLOCK
authorJens Axboe <axboe@suse.de>
Mon, 10 Jul 2006 19:55:38 +0000 (12:55 -0700)
committerJens Axboe <axboe@suse.de>
Mon, 10 Jul 2006 19:55:38 +0000 (12:55 -0700)
We cannot reliably detect when to quit in that case, so just always block.

ktee-net.c
ktee.c

index 3ae25296e5f9b2bd9de1aabbb67e815cea539b09..7f2653b8f4ff925b88fb3b3ae22dede7c5974468 100644 (file)
@@ -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 ebe9d9285fc1ce43a89ebe20af30434f1b8c20d1..06a1e4c26e0f3d0f2e35020ca9fb3ea76be8f499 100644 (file)
--- 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) {