[issue6867] return value of epoll.register

2009-09-08 Thread shaowei.cui

New submission from shaowei.cui :

help(select.epoll) show 'register(fd[, eventmask]) -> bool', but it
return 'None' actually. 

I view the source code of selectmodule.c that return None actually.

The function "pyepoll_internal_ctl(int epfd, int op, PyObject *pfd,
unsigned int events)"

--
assignee: georg.brandl
components: Documentation
messages: 92440
nosy: georg.brandl, shaovie
severity: normal
status: open
title: return value of epoll.register
type: behavior
versions: Python 3.1

___
Python tracker 
<http://bugs.python.org/issue6867>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6868] Check errno of epoll_ctrl

2009-09-08 Thread shaowei.cui

New submission from shaowei.cui :

in selectmodule.c, I found the code of epoll module
'result = epoll_ctl(epfd, op, fd, &ev);
if (errno == EBADF) {
/* fd already closed */
result = 0;
errno = 0;
}
'
'man epoll_ctl' show 'EBADF  epfd or fd is not a valid file
descriptor.', assume I register an fd of 'open('xxx', O_RDONLY)', return
value will be -1, errno will be EBADF,  
epoll not support 'file descriptors.' as i know,  or i register an fd
was not be opened.

--
components: Library (Lib)
messages: 92441
nosy: shaovie
severity: normal
status: open
title: Check errno of epoll_ctrl
type: behavior
versions: Python 3.1

___
Python tracker 
<http://bugs.python.org/issue6868>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com