Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for fork. #65

Closed
denik opened this issue Sep 13, 2012 · 0 comments
Closed

Patch for fork. #65

denik opened this issue Sep 13, 2012 · 0 comments
Milestone

Comments

@denik
Copy link
Member

denik commented Sep 13, 2012

gevent.fork calls for reinit of libevent in parent process, that leads to strange problems in gevent/libevent after calling fork.

Reported by ABoudkar.


earlier comments

ABoudkar said, at 2011-01-27T07:30:40.000Z:

This patch will fix issue 61.

carsten.klein@axn-software.de said, at 2011-03-21T21:06:01.000Z:

AFAIK the original behaviour

  1. fork child process
  2. if that succeeded, loop.fork()

if ok, but

  1. leave it to the user to call loop.reinit()

as is currently implemented seems fine with me. Non Issue?

carsten.klein@axn-software.de said, at 2011-03-21T21:10:25.000Z:

AFAIK the actual problem is calling loop.fork() on the parent process, since that will/may cause libevent to internally fork the loop and all its associated data. perhaps this is what is causing the problem.

so

result = originalfork()
if result == 0:
in child process
loop.fork()
return result

will do the trick?

carsten.klein@axn-software.de said, at 2011-03-21T21:13:12.000Z:

and which is basically what the patch provides - had better read it in full prior posting this :D

Denis.Bilenko said, at 2011-04-28T15:18:00.000Z:

The patch does indeed seem to fix issue #61 when running gevent 0.13.5 on libevent2

Thanks!

Denis.Bilenko said, at 2011-04-28T15:26:26.000Z:

Applied here: https://bitbucket.org/denis/gevent-0.13/changeset/18c7b65aded7

Denis.Bilenko said, at 2011-05-02T10:58:37.000Z:

Issue 61 has been merged into this issue.

@denik denik closed this as completed Sep 13, 2012
hashbrowncipher pushed a commit to hashbrowncipher/gevent that referenced this issue Oct 20, 2018
…5 environments.

Merged in mete0r_kr/tox/use-venv191-pip13-for-python25 (pull request gevent#65)

use inlined virtualenv-1.9.1 and pip<1.4 for CPython 2.5 / Jython 2.5 (revised)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant