#5060: iteratee: epollControl: permission denied (Operation not permitted)
-------------------------------+--------------------------------------------
    Reporter:  pacak           |       Owner:                             
        Type:  bug             |      Status:  new                        
    Priority:  normal          |   Component:  GHCi                       
     Version:  7.0.3           |    Keywords:                             
    Testcase:                  |   Blockedby:                             
          Os:  Linux           |    Blocking:                             
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect result at runtime
-------------------------------+--------------------------------------------

Comment(by pacak):

 Replying to [comment:5 tibbe]:
 > Replying to [comment:4 pacak]:
 > That's odd. The I/O manager should be using `epoll` on Linux.

 It should. But if it really used it - iteratee would be completly broken
 in all regular file operations. It uses the same interface to poll fd for
 data. This works for sockets and stuff but fails for regular files:

 {{{
 #include <sys/epoll.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <errno.h>


 int main(int argc, char *argv[]) {
 int fd = open("/etc/passwd", O_RDONLY);

 int efd = epoll_create(5);
 struct epoll_event ev = { 0, { 0 } };
 ev.events = EPOLLOUT;
 ev.data.fd = fd;
 if (epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ev) < 0) {
 perror("Failed to add fd to event set");
 }
 return 0;
 }
 }}}

 It seems, that they do not support poll at all.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5060#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to