Message175972
Note that Gregory P. Smith has written
http://code.google.com/p/python-atfork/
I also started a pure python patch but did not get round it posting it. (It also implements the fork lock idea.) I'll attach it here.
How do you intend to handle the propagation of exceptions? I decided that after
atfork.atfork(prepare1, parent1, child1)
atfork.atfork(prepare2, parent2, child2)
...
atfork.atfork(prepareN, parentN, childN)
calling "pid = os.fork()" should be equivalent to
pid = None
prepareN()
try:
...
prepare2()
try:
prepare1()
try:
pid = posix.fork()
finally:
parent1() if pid != 0 else child1()
finally:
parent2() if pid != 0 else child2()
...
finally:
parentN() if pid != 0 else childN() |
|
Date |
User |
Action |
Args |
2012-11-19 22:43:51 | sbt | set | recipients:
+ sbt, twouters, gregory.p.smith, christian.heimes |
2012-11-19 22:43:50 | sbt | set | messageid: <1353365030.15.0.682380769379.issue16500@psf.upfronthosting.co.za> |
2012-11-19 22:43:50 | sbt | link | issue16500 messages |
2012-11-19 22:43:49 | sbt | create | |
|