This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/4525] New: epoll_pwait broken


epoll_pwait doesn't work at all. It's because the syscall takes 6 parameters
while glibc supplies only 5.

This is glibc-2.6, kernel-2.6.20.

---- Test case 1 ----

#include <sys/epoll.h>
#include <stdio.h>
#include <errno.h>

int main(void) {
   int fd;
   struct epoll_event events[16];
   sigset_t sigs;
   int status;
   fd = epoll_create(16);
   sigemptyset(&sigs);
   status = epoll_pwait(fd, events, 16, 1000, &sigs);
   printf("%d %s\n", status, strerror(errno));
   return 0;
}

Result: -1 Invalid argument

---- Test case 2 ----

#define epoll_pwait epoll_pwaitx
#include <sys/epoll.h>
#undef epoll_pwait
...
   status = epoll_pwait(fd, events, 16, 1000, &sigs, 8);

Result: 0 Success

-- 
           Summary: epoll_pwait broken
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: qrczak at knm dot org dot pl
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: athlon-pld-linux
  GCC host triplet: athlon-pld-linux
GCC target triplet: athlon-pld-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=4525

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]