Followup : Huuuuge memory leak (third attempt)

Fredrik Lundh fredrik at
Mon Feb 19 09:08:04 EST 2001

jurgen.defurne at wrote:
> Since in the second version, the main loop sleeps long enough to make
> sure that the spawned script is finished before another one is released,

doesn't look like it's sleeping:

if len(sys.argv) == 1:
    while 1:
        # Doesn't matter if P_NOWAIT or P_DETACH, tried 'em both
        os.spawnl(os.P_DETACH, 'd:\\python20\\python', 'python', '', 'check')
        # no sleep here
elif sys.argv[1] == 'check':

adding a time.sleep(0.2) makes it work better -- and after 10 minutes,
the main process hasn't grown a single byte on my box...

Cheers /F

More information about the Python-list mailing list