Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
Wait until all subprocesses have finished.  Useful for testing.

        def waitForChildren(onceOnly=0, blocking=1):
    """Wait until all subprocesses have finished.  Useful for testing."""
    if sys.platform == 'win32':
        LOG.trace("Skipping waitForChildren")
        return
    if blocking:
        options = 0
    else:
        options = os.WNOHANG
    while 1:
        try:
            # WWWW This won't work on Windows.  What to do?
            pid, status = os.waitpid(-1, options)
        except OSError, e:
            return
        except e:
            print e, repr(e), e.__class__
        if onceOnly:
            return
        


src/m/i/mixminion-HEAD/lib/mixminion/server/Modules.py   mixminion(Download)
import mixminion.server.PacketHandler
from mixminion.Config import ConfigError
from mixminion.Common import LOG, MixError, ceilDiv, createPrivateDir, \
     encodeBase64, floorDiv, isPrintingAscii, isSMTPMailbox, previousMidnight,\
     readFile, waitForChildren
                    return
                self.moduleManager._sendReadyMessages()
                waitForChildren(blocking=0)
        except:
            LOG.error_exc(sys.exc_info(),

src/m/i/mixminion-HEAD/lib/mixminion/server/ServerMain.py   mixminion(Download)
 
from bisect import insort
from mixminion.Common import LOG, LogStream, MixError, MixFatalError,\
     UIError, ceilDiv, createPrivateDir, disp64, formatTime, \
     installSIGCHLDHandler, Lockfile, LockfileLocked, readFile, secureDelete, \

src/m/i/mixminion-HEAD/lib/mixminion/benchmark.py   mixminion(Download)
from mixminion.BuildMessage import _buildHeader, buildForwardPacket, \
     compressData, uncompressData, encodeMessage, decodePayload
from mixminion.Common import secureDelete, installSIGCHLDHandler, \
     waitForChildren, formatBase64, Lockfile
from mixminion.Crypto import *
    print "secureDelete (100x32)", timestr(t)
 
    waitForChildren()
    t = time()-t1
    print "               (sync)", timestr(t)
    print "secureDelete (1)", timestr(t/100)
 
    waitForChildren()
    t = time()-t1
    print "          (sync)", timestr(t/100)

src/m/i/mixminion-HEAD/lib/mixminion/testSupport.py   mixminion(Download)
import mixminion.Crypto
import mixminion.Common
from mixminion.Common import waitForChildren, ceilDiv, createPrivateDir, LOG
from mixminion.Config import _parseBoolean, _parseIntervalList, ConfigError
 
    if _WAIT_FOR_KIDS:
        print "Waiting for shred processes to finish."
        waitForChildren()
        _WAIT_FOR_KIDS = 0
    for d in dirs: