All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] tee.2: ffix
@ 2022-01-03 15:33 наб
  2022-01-03 15:34 ` [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use наб
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: наб @ 2022-01-03 15:33 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

---
 man2/tee.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/tee.2 b/man2/tee.2
index d2ceef331..14a927c93 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -143,7 +143,7 @@ Here is an example of its use:
 .PP
 .in +4n
 .EX
-$ \fBdate |./a.out out.log | cat\fP
+$ \fBdate | ./a.out out.log | cat\fP
 Tue Oct 28 10:06:00 CET 2014
 $ \fBcat out.log\fP
 Tue Oct 28 10:06:00 CET 2014
-- 
2.30.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use
  2022-01-03 15:33 [PATCH 1/3] tee.2: ffix наб
@ 2022-01-03 15:34 ` наб
  2022-01-03 16:25   ` Alejandro Colomar (man-pages)
  2022-01-03 15:34 ` [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1) наб
  2022-01-03 16:49 ` [PATCH 1/3] tee.2: ffix Alejandro Colomar (man-pages)
  2 siblings, 1 reply; 12+ messages in thread
From: наб @ 2022-01-03 15:34 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]

---
 man2/tee.2 | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 14a927c93..17b93882d 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -163,15 +163,12 @@ Tue Oct 28 10:06:00 CET 2014
 int
 main(int argc, char *argv[])
 {
-    int fd;
-    int len, slen;
-
     if (argc != 2) {
         fprintf(stderr, "Usage: %s <file>\en", argv[0]);
         exit(EXIT_FAILURE);
     }
 
-    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
+    int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
     if (fd == \-1) {
         perror("open");
         exit(EXIT_FAILURE);
@@ -181,9 +178,8 @@ main(int argc, char *argv[])
         /*
          * tee stdin to stdout.
          */
-        len = tee(STDIN_FILENO, STDOUT_FILENO,
-                  INT_MAX, SPLICE_F_NONBLOCK);
-
+        ssize_t len = tee(STDIN_FILENO, STDOUT_FILENO,
+                          INT_MAX, SPLICE_F_NONBLOCK);
         if (len < 0) {
             if (errno == EAGAIN)
                 continue;
@@ -197,8 +193,8 @@ main(int argc, char *argv[])
          * Consume stdin by splicing it to a file.
          */
         while (len > 0) {
-            slen = splice(STDIN_FILENO, NULL, fd, NULL,
-                          len, SPLICE_F_MOVE);
+            ssize_t slen = splice(STDIN_FILENO, NULL, fd, NULL,
+                                  len, SPLICE_F_MOVE);
             if (slen < 0) {
                 perror("splice");
                 break;
-- 
2.30.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1)
  2022-01-03 15:33 [PATCH 1/3] tee.2: ffix наб
  2022-01-03 15:34 ` [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use наб
@ 2022-01-03 15:34 ` наб
  2022-01-03 16:40   ` Alejandro Colomar (man-pages)
  2022-01-03 16:49 ` [PATCH 1/3] tee.2: ffix Alejandro Colomar (man-pages)
  2 siblings, 1 reply; 12+ messages in thread
From: наб @ 2022-01-03 15:34 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

---
 man2/tee.2 | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 17b93882d..4b410ecad 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -171,10 +171,10 @@ main(int argc, char *argv[])
     int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
     if (fd == \-1) {
         perror("open");
-        exit(EXIT_FAILURE);
+        return EXIT_FAILURE;
     }
 
-    do {
+    for (;;) {
         /*
          * tee stdin to stdout.
          */
@@ -184,7 +184,7 @@ main(int argc, char *argv[])
             if (errno == EAGAIN)
                 continue;
             perror("tee");
-            exit(EXIT_FAILURE);
+            return EXIT_FAILURE;
         } else
             if (len == 0)
                 break;
@@ -197,14 +197,13 @@ main(int argc, char *argv[])
                                   len, SPLICE_F_MOVE);
             if (slen < 0) {
                 perror("splice");
-                break;
+                return EXIT_FAILURE;
             }
             len \-= slen;
         }
-    } while (1);
+    }
 
     close(fd);
-    exit(EXIT_SUCCESS);
 }
 .EE
 .SH SEE ALSO
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use
  2022-01-03 15:34 ` [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use наб
@ 2022-01-03 16:25   ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-03 16:25 UTC (permalink / raw)
  To: наб; +Cc: linux-man

Hi, наб!

I like the change to use ssize_t, but I prefer C89 declarations of top 
of the function, with the only exception of C99 loop iterators, which we 
do use.  Could you please change the patch accordingly?

Thanks,

Alex

On 1/3/22 16:34, наб wrote:
> ---
>   man2/tee.2 | 14 +++++---------
>   1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/man2/tee.2 b/man2/tee.2
> index 14a927c93..17b93882d 100644
> --- a/man2/tee.2
> +++ b/man2/tee.2
> @@ -163,15 +163,12 @@ Tue Oct 28 10:06:00 CET 2014
>   int
>   main(int argc, char *argv[])
>   {
> -    int fd;
> -    int len, slen;
> -
>       if (argc != 2) {
>           fprintf(stderr, "Usage: %s <file>\en", argv[0]);
>           exit(EXIT_FAILURE);
>       }
>   
> -    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
> +    int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
>       if (fd == \-1) {
>           perror("open");
>           exit(EXIT_FAILURE);
> @@ -181,9 +178,8 @@ main(int argc, char *argv[])
>           /*
>            * tee stdin to stdout.
>            */
> -        len = tee(STDIN_FILENO, STDOUT_FILENO,
> -                  INT_MAX, SPLICE_F_NONBLOCK);
> -
> +        ssize_t len = tee(STDIN_FILENO, STDOUT_FILENO,
> +                          INT_MAX, SPLICE_F_NONBLOCK);
>           if (len < 0) {
>               if (errno == EAGAIN)
>                   continue;
> @@ -197,8 +193,8 @@ main(int argc, char *argv[])
>            * Consume stdin by splicing it to a file.
>            */
>           while (len > 0) {
> -            slen = splice(STDIN_FILENO, NULL, fd, NULL,
> -                          len, SPLICE_F_MOVE);
> +            ssize_t slen = splice(STDIN_FILENO, NULL, fd, NULL,
> +                                  len, SPLICE_F_MOVE);
>               if (slen < 0) {
>                   perror("splice");
>                   break;

-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1)
  2022-01-03 15:34 ` [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1) наб
@ 2022-01-03 16:40   ` Alejandro Colomar (man-pages)
  2022-01-03 17:03     ` [PATCH v2 2/4] tee.2: use proper types in example наб
                       ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-03 16:40 UTC (permalink / raw)
  To: наб; +Cc: linux-man

Hi наб,

Man pages extensively use exit(EXIT_ERROR) and exit(EXIT_SUCCESS) 
instead of return EXIT_ERROR and return EXIT_SUCCESS or even nothing at 
the end of main().  I never used that myself, and don't see much 
difference between exit(3) and return, but if only for consistency, and 
for keeping the status quo in case of doubt, I'll keep using exit(3).

However, I like the change to for(;;).  At least a while (1) would be 
sane, but do ... while (1) seems a bit weird to me :)
Could you please write a separate patch for that?

Also, please see an inline comment below.

Cheers,

Alex

On 1/3/22 16:34, наб wrote:
> ---
>   man2/tee.2 | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/man2/tee.2 b/man2/tee.2
> index 17b93882d..4b410ecad 100644
> --- a/man2/tee.2
> +++ b/man2/tee.2
> @@ -171,10 +171,10 @@ main(int argc, char *argv[])
>       int fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
>       if (fd == \-1) {
>           perror("open");
> -        exit(EXIT_FAILURE);
> +        return EXIT_FAILURE;
>       }
>   
> -    do {
> +    for (;;) {
>           /*
>            * tee stdin to stdout.
>            */
> @@ -184,7 +184,7 @@ main(int argc, char *argv[])
>               if (errno == EAGAIN)
>                   continue;
>               perror("tee");
> -            exit(EXIT_FAILURE);
> +            return EXIT_FAILURE;
>           } else
>               if (len == 0)
>                   break;
> @@ -197,14 +197,13 @@ main(int argc, char *argv[])
>                                     len, SPLICE_F_MOVE);
>               if (slen < 0) {
>                   perror("splice");
> -                break;
> +                return EXIT_FAILURE;

This seems like a bug in the example program, so a separate patch for it 
would be better.

This makes me think that the loop wasn't originally a do ... while (1) 
but something different, and in a rewrite, a few things were forgotten, 
maybe.

>               }
>               len \-= slen;
>           }
> -    } while (1);
> +    }
>   
>       close(fd);
> -    exit(EXIT_SUCCESS);
>   }
>   .EE
>   .SH SEE ALSO

-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/3] tee.2: ffix
  2022-01-03 15:33 [PATCH 1/3] tee.2: ffix наб
  2022-01-03 15:34 ` [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use наб
  2022-01-03 15:34 ` [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1) наб
@ 2022-01-03 16:49 ` Alejandro Colomar (man-pages)
  2 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-03 16:49 UTC (permalink / raw)
  To: наб; +Cc: linux-man



On 1/3/22 16:33, наб wrote:
> ---

наб, patch applied!

Thanks, Alex


>   man2/tee.2 | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man2/tee.2 b/man2/tee.2
> index d2ceef331..14a927c93 100644
> --- a/man2/tee.2
> +++ b/man2/tee.2
> @@ -143,7 +143,7 @@ Here is an example of its use:
>   .PP
>   .in +4n
>   .EX
> -$ \fBdate |./a.out out.log | cat\fP
> +$ \fBdate | ./a.out out.log | cat\fP
>   Tue Oct 28 10:06:00 CET 2014
>   $ \fBcat out.log\fP
>   Tue Oct 28 10:06:00 CET 2014

-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 2/4] tee.2: use proper types in example
  2022-01-03 16:40   ` Alejandro Colomar (man-pages)
@ 2022-01-03 17:03     ` наб
  2022-01-03 17:27       ` Alejandro Colomar (man-pages)
  2022-01-03 17:03     ` [PATCH v2 3/4] tee.2: use for(;;) instead of do{}while(1) наб
  2022-01-03 17:03     ` [PATCH v2 4/4] tee.2: always fail after perror() in example наб
  2 siblings, 1 reply; 12+ messages in thread
From: наб @ 2022-01-03 17:03 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
The difference is, realistically, negligible, but it does make the code
look like it came from the 4.3BSD era.

Comments applied. 1/4 not re-sent since you applied it.

 man2/tee.2 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 14a927c93..9d83ee982 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -164,7 +164,7 @@ int
 main(int argc, char *argv[])
 {
     int fd;
-    int len, slen;
+    ssize_t len, slen;
 
     if (argc != 2) {
         fprintf(stderr, "Usage: %s <file>\en", argv[0]);
@@ -183,7 +183,6 @@ main(int argc, char *argv[])
          */
         len = tee(STDIN_FILENO, STDOUT_FILENO,
                   INT_MAX, SPLICE_F_NONBLOCK);
-
         if (len < 0) {
             if (errno == EAGAIN)
                 continue;
-- 
2.30.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/4] tee.2: use for(;;) instead of do{}while(1)
  2022-01-03 16:40   ` Alejandro Colomar (man-pages)
  2022-01-03 17:03     ` [PATCH v2 2/4] tee.2: use proper types in example наб
@ 2022-01-03 17:03     ` наб
  2022-01-03 17:03     ` [PATCH v2 4/4] tee.2: always fail after perror() in example наб
  2 siblings, 0 replies; 12+ messages in thread
From: наб @ 2022-01-03 17:03 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 635 bytes --]

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 man2/tee.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 3160cfdf7..831c02b77 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -177,7 +177,7 @@ main(int argc, char *argv[])
         exit(EXIT_FAILURE);
     }
 
-    do {
+    for (;;) {
         /*
          * tee stdin to stdout.
          */
@@ -204,7 +204,7 @@ main(int argc, char *argv[])
             }
             len \-= slen;
         }
-    } while (1);
+    }
 
     close(fd);
     exit(EXIT_SUCCESS);
-- 
2.30.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 4/4] tee.2: always fail after perror() in example
  2022-01-03 16:40   ` Alejandro Colomar (man-pages)
  2022-01-03 17:03     ` [PATCH v2 2/4] tee.2: use proper types in example наб
  2022-01-03 17:03     ` [PATCH v2 3/4] tee.2: use for(;;) instead of do{}while(1) наб
@ 2022-01-03 17:03     ` наб
  2 siblings, 0 replies; 12+ messages in thread
From: наб @ 2022-01-03 17:03 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 man2/tee.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man2/tee.2 b/man2/tee.2
index 831c02b77..89b119b81 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -200,7 +200,7 @@ main(int argc, char *argv[])
                           len, SPLICE_F_MOVE);
             if (slen < 0) {
                 perror("splice");
-                break;
+                exit(EXIT_FAILURE);
             }
             len \-= slen;
         }
-- 
2.30.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/4] tee.2: use proper types in example
  2022-01-03 17:03     ` [PATCH v2 2/4] tee.2: use proper types in example наб
@ 2022-01-03 17:27       ` Alejandro Colomar (man-pages)
  2022-01-03 17:35         ` наб
  0 siblings, 1 reply; 12+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-03 17:27 UTC (permalink / raw)
  To: наб; +Cc: linux-man

On 1/3/22 18:03, наб wrote:
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
> ---
> The difference is, realistically, negligible, but it does make the code
> look like it came from the 4.3BSD era.

:-)

> 
> Comments applied. 1/4 not re-sent since you applied it.

I applied all of v2, and another one to remove an unnecessary 'else'.

Cheers,

Alex

> 
>   man2/tee.2 | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/man2/tee.2 b/man2/tee.2
> index 14a927c93..9d83ee982 100644
> --- a/man2/tee.2
> +++ b/man2/tee.2
> @@ -164,7 +164,7 @@ int
>   main(int argc, char *argv[])
>   {
>       int fd;
> -    int len, slen;
> +    ssize_t len, slen;
>   
>       if (argc != 2) {
>           fprintf(stderr, "Usage: %s <file>\en", argv[0]);
> @@ -183,7 +183,6 @@ main(int argc, char *argv[])
>            */
>           len = tee(STDIN_FILENO, STDOUT_FILENO,
>                     INT_MAX, SPLICE_F_NONBLOCK);
> -

I removed this change, since I guessed it was a rebase mistake.

>           if (len < 0) {
>               if (errno == EAGAIN)
>                   continue;

-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/4] tee.2: use proper types in example
  2022-01-03 17:27       ` Alejandro Colomar (man-pages)
@ 2022-01-03 17:35         ` наб
  2022-01-03 17:51           ` Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 12+ messages in thread
From: наб @ 2022-01-03 17:35 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

On Mon, Jan 03, 2022 at 06:27:36PM +0100, Alejandro Colomar (man-pages) wrote:
> On 1/3/22 18:03, наб wrote:
> > diff --git a/man2/tee.2 b/man2/tee.2
> > index 14a927c93..9d83ee982 100644
> > --- a/man2/tee.2
> > +++ b/man2/tee.2
> > @@ -183,7 +183,6 @@ main(int argc, char *argv[])
> >            */
> >           len = tee(STDIN_FILENO, STDOUT_FILENO,
> >                     INT_MAX, SPLICE_F_NONBLOCK);
> > -
> I removed this change, since I guessed it was a rebase mistake.
Not really, I left it in deliberately, for consistency:
neither fd= nor slen= have a blank line after.

наб

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v2 2/4] tee.2: use proper types in example
  2022-01-03 17:35         ` наб
@ 2022-01-03 17:51           ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 12+ messages in thread
From: Alejandro Colomar (man-pages) @ 2022-01-03 17:51 UTC (permalink / raw)
  To: наб; +Cc: linux-man



On 1/3/22 18:35, наб wrote:
> On Mon, Jan 03, 2022 at 06:27:36PM +0100, Alejandro Colomar (man-pages) wrote:
>> On 1/3/22 18:03, наб wrote:
>>> diff --git a/man2/tee.2 b/man2/tee.2
>>> index 14a927c93..9d83ee982 100644
>>> --- a/man2/tee.2
>>> +++ b/man2/tee.2
>>> @@ -183,7 +183,6 @@ main(int argc, char *argv[])
>>>             */
>>>            len = tee(STDIN_FILENO, STDOUT_FILENO,
>>>                      INT_MAX, SPLICE_F_NONBLOCK);
>>> -
>> I removed this change, since I guessed it was a rebase mistake.
> Not really, I left it in deliberately, for consistency:
> neither fd= nor slen= have a blank line after.

Ahh, okay.

I reapplied your patch, to get this change, and renamed it to ffix.

Thanks,

Alex

P.S.: I thought the C.UTF-8 locale might show your name better, but it 
didn't; I just get '?'s.

> 
> наб

Author: <D0><BD><D0><B0><D0><B1> <nabijaczleweli@nabijaczleweli.xyz>
Date:   Mon Jan 3 18:03:32 2022 +0100

     tee.2: ffix

     Signed-off-by: Ahelenia Ziemia<C5><84>ska 
<nabijaczleweli@nabijaczleweli.xyz>
     Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>

diff --git a/man2/tee.2 b/man2/tee.2
index cd7c2d72d..15db551b9 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -183,7 +183,6 @@ main(int argc, char *argv[])
           */
          len = tee(STDIN_FILENO, STDOUT_FILENO,
                    INT_MAX, SPLICE_F_NONBLOCK);
-
          if (len < 0) {
              if (errno == EAGAIN)
                  continue;


-- 
Alejandro Colomar
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-03 17:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 15:33 [PATCH 1/3] tee.2: ffix наб
2022-01-03 15:34 ` [PATCH 2/3] tee.2: use proper types in example, declare variables at point-of-use наб
2022-01-03 16:25   ` Alejandro Colomar (man-pages)
2022-01-03 15:34 ` [PATCH 3/3] tee.2: always fail after perror(), use for(;;) instead of do{}while(1) наб
2022-01-03 16:40   ` Alejandro Colomar (man-pages)
2022-01-03 17:03     ` [PATCH v2 2/4] tee.2: use proper types in example наб
2022-01-03 17:27       ` Alejandro Colomar (man-pages)
2022-01-03 17:35         ` наб
2022-01-03 17:51           ` Alejandro Colomar (man-pages)
2022-01-03 17:03     ` [PATCH v2 3/4] tee.2: use for(;;) instead of do{}while(1) наб
2022-01-03 17:03     ` [PATCH v2 4/4] tee.2: always fail after perror() in example наб
2022-01-03 16:49 ` [PATCH 1/3] tee.2: ffix Alejandro Colomar (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.