Frank van Viegen wrote:
> Package: manpages-dev
> Version: 2.34-1
> 
> The epoll_ctl(2) man page states:
> 
> ERRORS
>       EBADF  epfd is not a valid file descriptor.
> 
> However, based upon actual kernel (2.6.11-9-em64t-p4-smp) behaviour it
> should probably read:
> 
> ERRORS
>       EBADF  fd is not a valid file descriptor.

What makes you think this is true?

Looking into sys_epoll_ctl() in fs/eventpoll.c of 2.6.16 I find

[..]
        /* Get the "struct file *" for the eventpoll file */
        error = -EBADF;
        file = fget(epfd);
        if (!file)
                goto eexit_1;
[..]
eexit_1:
        DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_ctl(%d, %d, %d, %p) = 
%d\n",
                     current, epfd, op, fd, event, error));

        return error;

So, looking at the code, EBADF refers to epfd and not to fd, just
as it is documented in the manual page.

Regards,

        Joey

-- 
GNU does not eliminate all the world's problems, only some of them.
                                                -- The GNU Manifesto

Please always Cc to me when replying to me on the lists.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to