Huuuuge memory leak (third attempt)

jurgen.defurne at philips.com jurgen.defurne at philips.com
Tue Feb 20 08:54:57 EST 2001


If I were using Linux/Python 2.0, I would preferably use fork()/exec().
Unfortunately, that is not the case.

The MS documentation about spawn does not mention anything about
waiting for termination of the proces. Besides, the _cwait call, which
acts on the process handle, is not implemented in Python, os.waitpid()
is only available on U*ix systems.

So, yes, I will try to write the same functionality in C, and look what that
gives.

Thank you very much.

Jurgen




jepler at inetnebr.com@SMTP at python.org on 20/02/2001 14:31:50
Sent by:	python-list-admin at python.org
To:	python-list at python.org@SMTP
cc:	 
Subject:	Re: Huuuuge memory leak (third attempt)
Classification:	

On Mon, 19 Feb 2001 09:12:40 +0100, jurgen.defurne at philips.com
 <jurgen.defurne at philips.com> wrote:
>Thanks, everybody,
>
>for the comments on the multiple assignment. Unfortunately,
>that was the least of my problems.

I would suggest entering this bug in the bug tracking system at
	http://sourceforge.net/projects/python/
This may be a genuine bug.

Another thing you could do is try the equivalent program written in
C on Windows NT, to see if it exhibits the problem.  It is possible
that this is a bug in Windows, not in Python.

I don't know what the equivalent of "/bin/false" is in Windows NT, but
does the result change if a more trivial program is executed?

Running the following code on Linux/Python 2.0, I soon get an error
due to the number of "zombie" processes.  "zombie" processes are those
whose exit codes have not been read by the waitpid() or wait() functions
in the os module.  Is something like "waitpid()" necessary/possible under
NT?  Adding waitpid() lets it run seemingly forever without error.

import os, time

while 1:
        pid = os.spawnv(os.P_NOWAIT, "false", "/bin/false")
        #print pid, os.waitpid(pid, 0)

Jeff
--
http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list