[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-27 Thread STINNER Victor

STINNER Victor added the comment:

> Old code looked strange after issue18571:

epoll_create() is a deprecated. epoll_create(size): "Since Linux
2.6.8, the size argument is ignored, but must be  greater  than  zero"
according to the man page. So it's fine to always call
epoll_create1(flags).

Example of new potential new flag for epoll_create1(): ten years ago,
EPOLL_NONBLOCK was proposed:
https://lkml.org/lkml/2008/8/24/130
(but it seems like it doesn't make sense, since the syscall cannot block)

Recent epoll evolutions don't seem to be on epoll_create1():
https://lwn.net/Articles/633422/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Old code looked strange after issue18571:

flags |= EPOLL_CLOEXEC;
if (flags)
self->epfd = epoll_create1(flags);
else

The condition is always true unless EPOLL_CLOEXEC is 0.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread STINNER Victor

STINNER Victor added the comment:

I dislike this change. Python is not responsible to check parameters of OS
syscalls, this function should be a thin wrapper to the OS function. Linux
may add new flags in the future.

Le lundi 26 septembre 2016, Roundup Robot  a écrit :

>
> Roundup Robot added the comment:
>
> New changeset ac24e5c2fd3e by Berker Peksag in branch 'default':
> Issue #20100: Simplify newPyEpoll_Object()
> https://hg.python.org/cpython/rev/ac24e5c2fd3e
>
> --
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac24e5c2fd3e by Berker Peksag in branch 'default':
Issue #20100: Simplify newPyEpoll_Object()
https://hg.python.org/cpython/rev/ac24e5c2fd3e

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-26 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-11 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is small behavior difference. Currently OSError raised for invalid flags 
has errno=EINVAL, with the patch it wouldn't have errno. If this is okay, the 
patch LGTM.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-11 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch for Modules/selectmodule.c. It would be nice to get a 
code review.

--
Added file: http://bugs.python.org/file44553/selectmodule.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9023c4f5d467 by Berker Peksag in branch '3.5':
Issue #20100: Clarify that passing flags to epoll() has no effect
https://hg.python.org/cpython/rev/9023c4f5d467

New changeset d2b5806fa770 by Berker Peksag in branch 'default':
Issue #20100: Merge from 3.5
https://hg.python.org/cpython/rev/d2b5806fa770

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2016-09-08 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, priyapappachan. Here is an updated patch. Since 
EPOLL_CLOEXEC is the only value that can be passed to epoll_create1(), we can 
also simplify the implementation a bit.

--
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file44476/issue20100_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


Added file: http://bugs.python.org/file34618/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


Added file: http://bugs.python.org/file34616/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2014-03-25 Thread priya

Changes by priya :


--
keywords: +patch
Added file: http://bugs.python.org/file34611/epoll.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2013-12-31 Thread STINNER Victor

STINNER Victor added the comment:

Use os.set_inheritable(epoll.fileno(), True) to make the file descriptor
inheritable. You should find this info easily if you follow the link on
"non inheritable" in epoll documentation.

EPOLL_CLOEXEC becomes useless in Python 3.4. It is used internally by
default if available. Removing it would break existing code, it would be
harder to write code for python 3.4 and 3.3.

Just update the doc.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20100] epoll docs are not clear with regards to CLOEXEC.

2013-12-31 Thread R. David Murray

New submission from R. David Murray:

http://docs.python.org/dev/library/select.html#select.epoll documents the 
EPOLL_CLOEXEC flag as something you can specify that makes the file descriptor 
be closed on exec.  But then it goes on to say that the file descriptor is 
non-inheritable.  So is the flag useless and should be removed from the docs, 
or is the documentation just unclear as to its purpose?  Or, conversely, do we 
need a way to say that the file descriptor should *not* be closed on exec?

--
assignee: docs@python
components: Documentation
messages: 207121
nosy: docs@python, haypo, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: epoll docs are not clear with regards to CLOEXEC.
type: behavior
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com