#3591 closed bug (fixed)
poll(NULL, 0, t)
Reported by: | Adek336 | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/Kernel | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
#include <poll.h> #include <stdio.h> int main() { int i = poll(NULL, 0, 2000); fprintf(stderr, "%d\n", i); return 0; }
Haiku: immiedately prints -1 Linux, FreeBSD: sleeps for 2 seconds and prints 0
This program passes fds = NULL but at the same time, nfds = 0; so there isn't any actual null pointer dereference. The docs http://www.opengroup.org/onlinepubs/007908799/xsh/poll.html don't seem to cover this issue. I guess Haiku should follow the standard undocumented behaviour.
http://www.freelists.org/post/haiku-development/poll2-with-nfds0
Change History (3)
comment:1 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed in hrev29633.