Joakim Tjernlund a écrit :
And why not pass NULL as it was before?

The man 2 ppoll say:

"If timeout is specified as NULL, then ppoll() can block indefinitely."

So you are right, it's possible to passe a null pointer to do the same as negative value.

A new patch is in attachement.
Index: libc/sysdeps/linux/common/poll.c
===================================================================
--- libc/sysdeps/linux/common/poll.c    (revision 20316)
+++ libc/sysdeps/linux/common/poll.c    (working copy)
@@ -38,6 +38,10 @@
                tval.tv_sec = timeout / 1000;
                tval.tv_nsec = (timeout % 1000) * 1000000;
                ts = &tval;
+       } else if (timeout == 0) {
+               tval.tv_sec = 0;
+               tval.tv_nsec = 0;
+               ts = &tval;
        }
        return ppoll(fds, nfds, ts, NULL);
 }
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to