Subject: poll(2) oddity
To: None <firstname.lastname@example.org>
From: Christophe Kalt <email@example.com>
Date: 07/07/2002 00:44:06
i have a strange problem which seems like a bug with poll(2),
but i'm probably missing something obvious with my code.
i have the following 4 lines of code:
pollrc = poll(pfd+20, 16, 250);
printf("poll #1 -> %d\n", pollrc);
pollrc = poll(pfd, 36, 250);
printf("poll #2 -> %d\n", pollrc);
all but the 3rd one were added to try and figure out the
problem i'm seeing.
afaict, only the first 20 pfd's get scanned by poll(). (i
get results for pfd.) after a while, my program loops
displaying the following continuously:
poll #1 -> 2
poll #2 -> 0
why isn't the 2nd poll() picking up these 2 fds??
any help/hint would be appreciated.
FWIW, the same code works as expected on Solaris.