All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] poll.2: tfix
@ 2022-08-08 15:07 Štěpán Němec
  2022-08-15 21:28 ` Alejandro Colomar
  0 siblings, 1 reply; 5+ messages in thread
From: Štěpán Němec @ 2022-08-08 15:07 UTC (permalink / raw)
  To: linux-man, Alejandro Colomar, Michael Kerrisk

Fixes: 0bdda5d08e82 ("poll.2: Note that poll() equivalent code for ppoll() is not quite equivalent")
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
---
 man2/poll.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/poll.2 b/man2/poll.2
index ff22045247f3..d98d94172b08 100644
--- a/man2/poll.2
+++ b/man2/poll.2
@@ -351,7 +351,7 @@ value.
 .B EINVAL
 .RB ( ppoll ())
 The timeout value expressed in
-.I *ip
+.I *tmo_p
 is invalid (negative).
 .TP
 .B ENOMEM
@@ -468,7 +468,7 @@ field in a human-readable form;
 if the file descriptor is readable, reads some data from it,
 and displays that data on standard output; and
 .IP \(bu
-if the file descriptors was not readable,
+if the file descriptor was not readable,
 but some other event occurred (presumably
 .BR POLLHUP ),
 closes the file descriptor.

base-commit: 226cd95d78c24dee169bb96913721221fb8f656a
-- 
2.37.1


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

* Re: [PATCH] poll.2: tfix
  2022-08-08 15:07 [PATCH] poll.2: tfix Štěpán Němec
@ 2022-08-15 21:28 ` Alejandro Colomar
  0 siblings, 0 replies; 5+ messages in thread
From: Alejandro Colomar @ 2022-08-15 21:28 UTC (permalink / raw)
  To: Štěpán Němec, linux-man, Michael Kerrisk


[-- Attachment #1.1: Type: text/plain, Size: 1154 bytes --]

Hi Štěpán,

On 8/8/22 17:07, Štěpán Němec wrote:
> Fixes: 0bdda5d08e82 ("poll.2: Note that poll() equivalent code for ppoll() is not quite equivalent")
> Signed-off-by: Štěpán Němec <stepnem@gmail.com>

Patch applied.

Thanks,

Alex

> ---
>   man2/poll.2 | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man2/poll.2 b/man2/poll.2
> index ff22045247f3..d98d94172b08 100644
> --- a/man2/poll.2
> +++ b/man2/poll.2
> @@ -351,7 +351,7 @@ value.
>   .B EINVAL
>   .RB ( ppoll ())
>   The timeout value expressed in
> -.I *ip
> +.I *tmo_p
>   is invalid (negative).
>   .TP
>   .B ENOMEM
> @@ -468,7 +468,7 @@ field in a human-readable form;
>   if the file descriptor is readable, reads some data from it,
>   and displays that data on standard output; and
>   .IP \(bu
> -if the file descriptors was not readable,
> +if the file descriptor was not readable,
>   but some other event occurred (presumably
>   .BR POLLHUP ),
>   closes the file descriptor.
> 
> base-commit: 226cd95d78c24dee169bb96913721221fb8f656a

-- 
Alejandro Colomar
<http://www.alejandro-colomar.es/>

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

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

* Re: [patch] poll.2: tfix
       [not found] <CANJ8pZ_g0Bq+9AH6iVjm_xJr3o5TEuhkEA0qRi4JNteUB+jfrQ@mail.gmail.com>
@ 2023-04-05  1:40 ` Alejandro Colomar
  0 siblings, 0 replies; 5+ messages in thread
From: Alejandro Colomar @ 2023-04-05  1:40 UTC (permalink / raw)
  To: Enke Chen, linux-man


[-- Attachment #1.1: Type: text/plain, Size: 1044 bytes --]

Hello Enke,

On 4/4/23 03:40, Enke Chen wrote:
> diff --git a/man2/poll.2 b/man2/poll.2
> index 4e26e62d4..5d2fa622d 100644
> --- a/man2/poll.2
> +++ b/man2/poll.2
> @@ -604,7 +604,7 @@ main(int argc, char *argv[])
> 
>          /* Deal with array returned by poll(). */
> 
> -        for (nfds_t j = 0; j < nfds; j++) {
> +        for (nfds_t j = 0; j < ready; j++) {

This is not correct.  The array is of size nfds.  ready is
just the number of entries in the array that have been changed,
but there's no information about the order in which they'll
appear.

If you compile the program with the current code, you'll be
able to verify that it works.  But with this patch, I believe
it will stop working.

Thanks,
Alex

>              if (pfds[j].revents != 0) {
>                  printf("  fd=%d; events: %s%s%s\en", pfds[j].fd,
>                         (pfds[j].revents & POLLIN)  ? "POLLIN "  : "",
> 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

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

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

* Re: [PATCH] poll.2: tfix
       [not found] ` <1336629593-10300-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
@ 2012-05-10  6:08   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-05-10  6:08 UTC (permalink / raw)
  To: David Prévot; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Thanks David. Applied.

On Thu, May 10, 2012 at 5:59 PM, David Prévot <taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org> wrote:
> ---
>  man2/poll.2 |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man2/poll.2 b/man2/poll.2
> index ee53353..87905e8 100644
> --- a/man2/poll.2
> +++ b/man2/poll.2
> @@ -135,7 +135,7 @@ Specifying a
>  .I timeout
>  of zero causes
>  .BR poll ()
> -to return immediately, even if no file desciptors are ready.
> +to return immediately, even if no file descriptors are ready.
>
>  The bits that may be set/returned in
>  .I events
> --
> 1.7.10
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] poll.2: tfix
@ 2012-05-10  5:59 David Prévot
       [not found] ` <1336629593-10300-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: David Prévot @ 2012-05-10  5:59 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, David Prévot

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

diff --git a/man2/poll.2 b/man2/poll.2
index ee53353..87905e8 100644
--- a/man2/poll.2
+++ b/man2/poll.2
@@ -135,7 +135,7 @@ Specifying a
 .I timeout
 of zero causes
 .BR poll ()
-to return immediately, even if no file desciptors are ready.
+to return immediately, even if no file descriptors are ready.
 
 The bits that may be set/returned in
 .I events
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2023-04-05  1:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 15:07 [PATCH] poll.2: tfix Štěpán Němec
2022-08-15 21:28 ` Alejandro Colomar
     [not found] <CANJ8pZ_g0Bq+9AH6iVjm_xJr3o5TEuhkEA0qRi4JNteUB+jfrQ@mail.gmail.com>
2023-04-05  1:40 ` [patch] " Alejandro Colomar
  -- strict thread matches above, loose matches on Subject: below --
2012-05-10  5:59 [PATCH] " David Prévot
     [not found] ` <1336629593-10300-1-git-send-email-taffit-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org>
2012-05-10  6:08   ` Michael Kerrisk (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.