Problem with running external process

Donn Cave donn at drizzle.com
Sat Jan 21 00:21:57 EST 2006


Quoth "ToMasz" <t_mo_info at o2.pl>:
| There is a script running continuously which executes an external
| script in a loop using os.spawnlp(os.P_WAIT, 'extscript.py') function.
| After several hundred executions (cycles of the loop), the main script
| gets an exception while trying to start the process. This situation is
| repeated until the main script is killed. Before it is killed, no other
| command can be executed - I'm getting the message:
|
| -bash: fork: Resource temporarily unavailable.
|
| How to properly execute another process from my script?

Not sure what's causing this.  I suggest you invoke "ps" after a
hundred iterations or so - maybe "ps -ef", or "ps wwaux" on BSD
platforms like MacOS.  I think the output may show a large number
of processes, and you will know where they came from.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list