[issue10636] subprocess module has race condition with SIGCHLD handlers

2011-06-23 Thread Ross Lagerwall
Ross Lagerwall added the comment: > The right approach is to use sigblock/sigsetmask before creating the > process, and then again after creating it. Unfortunately, these aren't > exposed from the signal module. Since 3.3, pthread_sigmask is exposed so the right approach can now be taken ;-) C

[issue10636] subprocess module has race condition with SIGCHLD handlers

2010-12-05 Thread joseph.h.garvin
joseph.h.garvin added the comment: Sorry I wasn't trying to make a request, just suggesting one potential 'fix' (I agree that it isn't really though) to make things more intutive. Unless the app is delayed from launching until after the assignment finishes though I think a workaround is requi

[issue10636] subprocess module has race condition with SIGCHLD handlers

2010-12-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: > If when it caught SIGCHLD python pushed an event onto its internal > event loop to execute the handler, I think that would make sure it's > deferred until after the assignment. This is not a reasonable request. How long would you want to postpone this? Suppo

[issue10636] subprocess module has race condition with SIGCHLD handlers

2010-12-05 Thread joseph.h.garvin
New submission from joseph.h.garvin : The following code will result in a traceback 99% of the time, though it may take two runs (sometimes the first run won't trigger it, I think due to the changing in timing from genrating the .pyc file). It spawns an instance of /bin/echo, chosen because it