Re: epoll help

From: Muli Ben-Yehuda (mulix_at_nonexisting.hamakor.org.il)
Date: Tue 24 Aug 2004 - 22:58:09 IDT


On Tue, Aug 24, 2004 at 10:03:43PM +0300, Shachar Shemesh wrote:
> Hi all,
>
> I'm trying to make the attached very very simple program work:
>
> For some reason, the first epoll_ctl fails with "Acess denied". I don't
> know why.

Use the source, Luke...

fs/eventpoll.c:sys_epoll_ctl()

        /* The target file descriptor must support poll */
        error = -EPERM;
        if (!tfile->f_op || !tfile->f_op->poll)
           goto eexit_3;

> int res=epoll_create(300);
> int file=open("test.tag", O_CREAT|O_RDWR, 0664);

make this:

int file=open("test.tag", O_RDWR, 0664);

muli_at_granada:~/tmp$ mkfifo test.tag; echo $?
0
muli_at_granada:~/tmp$ ./epoll
res=3, file=4
muli_at_granada:~/tmp$

Cheers,
Muli

-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

=================================================================
To unsubscribe, send mail to linux-il-request_at_linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request_at_linux.org.il




This archive was generated by hypermail 2.1.7 : Tue 24 Aug 2004 - 23:13:02 IDT