Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
> > To expand on that just a bit, the form of sharing that you get when you > fork() but you don't exec() is very difficult to use correctly (I think > it's an open question whether it's *possible* to use correctly in a Python > program). > > The argument here is similar to the argument against sha

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread exarkun
On 11:19 am, ita...@itamarst.org wrote: On 10/23/2013 12:50 PM, Phil Mayers wrote: This is a multiprocessing bug IMHO. This issue with multiprocessing appears in other places too. E.g. if you're using stdlib logging, child processes will try to rotate the parent process logs. Basically mu

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Itamar Turner-Trauring
On 10/23/2013 12:50 PM, Phil Mayers wrote: This is a multiprocessing bug IMHO. This issue with multiprocessing appears in other places too. E.g. if you're using stdlib logging, child processes will try to rotate the parent process logs. Basically multiprocessing on Unix is utterly broken a

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
> > 2. Arrange for the epoll object (or FD) to be closed after fork, but > > before exec, so that the child process can't fiddle with it > > See also: > > http://bugs.python.org/issue8713 > > ...which suggests Python 3.4 added fork+exec support to multiprocessing. > On Unix and older Python versi

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-24 Thread Flint
> > On 03:46 pm, grindi...@gmail.com wrote: > >Hi everybody > > > >I a came across a surprising problem when using the epoll based > >reactor. > >(ticket here https://twistedmatrix.com/trac/ticket/6796) > > > >As you can see on the ticket, the epoll object seems to share some > >state > >even after

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread exarkun
On 03:46 pm, grindi...@gmail.com wrote: Hi everybody I a came across a surprising problem when using the epoll based reactor. (ticket here https://twistedmatrix.com/trac/ticket/6796) As you can see on the ticket, the epoll object seems to share some state even after fork. [snip] - Using s

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Phil Mayers
On 23/10/13 17:39, Phil Mayers wrote: 2. Arrange for the epoll object (or FD) to be closed after fork, but before exec, so that the child process can't fiddle with it See also: http://bugs.python.org/issue8713 ...which suggests Python 3.4 added fork+exec support to multiprocessing. On Uni

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Tobias Oberstein
eally FreeBSD. OSX kqueue isn't the greatest. /Tobias Von: twisted-python-boun...@twistedmatrix.com [mailto:twisted-python-boun...@twistedmatrix.com] Im Auftrag von Flint Gesendet: Mittwoch, 23. Oktober 2013 17:46 An: twisted-python@twistedmatrix.com Betreff: [Twisted-Python] epoll keep sha

Re: [Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Phil Mayers
On 23/10/13 16:46, Flint wrote: Hi everybody I a came across a surprising problem when using the epoll based reactor. (ticket here https://twistedmatrix.com/trac/ticket/6796) As you can see on the ticket, the epoll object seems to share some state even after fork. Which means even after having

[Twisted-Python] epoll keep sharing state between process even after fork.

2013-10-23 Thread Flint
Hi everybody I a came across a surprising problem when using the epoll based reactor. (ticket here https://twistedmatrix.com/trac/ticket/6796) As you can see on the ticket, the epoll object seems to share some state even after fork. Which means even after having forked the process, making some ch