[issue10115] Support accept4() for atomic setting of flags at socket creation

2013-08-27 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.4 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10115] Support accept4() for atomic setting of flags at socket creation

2013-08-27 Thread STINNER Victor
STINNER Victor added the comment: Python 3.4 now uses accept4() internally for socket.socket.accept(), the new socket is created non-inheritable. See the PEP 446 for more information (PEP implemented in the issue #18571). -- resolution: -> fixed status: open -> closed ___

[issue10115] Support accept4() for atomic setting of flags at socket creation

2013-01-18 Thread STINNER Victor
STINNER Victor added the comment: My implementation of the PEP 433 uses accept4() for socket.accept() if the (new) cloexec parameter is True: http://hg.python.org/features/pep-433/file/46b7a077ae87/Modules/socketmodule.c#l1961 The code fallbacks to accept() if accept4() fails with ENOSYS. It ha

[issue10115] Support accept4() for atomic setting of flags at socket creation

2013-01-12 Thread STINNER Victor
STINNER Victor added the comment: See the PEP 433 which proposes an unified API to set/unset close-on-exec flag on any function creating a file descriptor. -- ___ Python tracker ___

[issue10115] Support accept4() for atomic setting of flags at socket creation

2012-02-28 Thread Matt Joiner
Matt Joiner added the comment: Can we get this exposed as an os.accept4, and an optional flags parameter to socket.socket.accept? -- nosy: +anacrolix ___ Python tracker ___ ___

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > The same value as for other non-blocking sockets, IMO. > There are three possible values I think: > 1. parent's current sock_timeout > 2. global default socket timeout > 3. 0 > > Can you please tell which one? I assume it should be number 3. Yes (again, IM

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: > The same value as for other non-blocking sockets, IMO. There are three possible values I think: 1. parent's current sock_timeout 2. global default socket timeout 3. 0 Can you please tell which one? I assume it should be number 3. -- __

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What value should we assign to sock->sock_timeout if SOCK_NONBLOCK was > specified in accept4() call? The same value as for other non-blocking sockets, IMO. > And in socket.py should we check as in original accept: > if getdefaulttimeout() is None and self.

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: up? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-10-27 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Started implementing accept4() socket method and stuck on socket object's timeout attribute. What value should we assign to sock->sock_timeout if SOCK_NONBLOCK was specified in accept4() call? And in socket.py should we check as in original accept: if getde

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-06-11 Thread Charles-François Natali
Charles-François Natali added the comment: No one seems to object, and since this approach has been suggested by Martin and is consistent with the posix module's policy (i.e. a thin wrapper around the underlying syscall), I guess you can go ahead. -- __

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-06-07 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Yes, I can. We decided to expose accept4() as another socket method, not accept() replacement? -- ___ Python tracker ___ ___

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-06-06 Thread Charles-François Natali
Charles-François Natali added the comment: @nvetoshkin Could you update your patch against py3k? I've got a couple comments (can't login to Rietveld, it's probably due to the change of my tracker account name): if(flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) { PyErr_SetString(PyExc_ValueError

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-05-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +charles-francois.natali, haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-02-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Duplicated in issue11157. -- nosy: +mmarkk ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10115] Support accept4() for atomic setting of flags at socket creation

2010-10-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've removed the accept4() call in the meantime (in r85796), so that this issue can be re-classified as a feature request. -- priority: critical -> normal title: accept4 can fail with errno 90 -> Support accept4() for atomic setting of flags at socket