No, no, that wasn't my intention (I'm just not conscious enough what's
going on with these fork, exec, spawn.. functions).
My parent process should start the child process and go back to it's
tasks. Before executing it for the next time the parent should check if
the previous child process is done
In article [EMAIL PROTECTED],
ToMasz [EMAIL PROTECTED] wrote:
No, no, that wasn't my intention (I'm just not conscious enough what's
going on with these fork, exec, spawn.. functions).
My parent process should start the child process and go back to it's
tasks. Before executing it for the
This is the result of ulimit command on my machine:
core file size(blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files
On 23 Jan 2006 04:33:17 -0800,
ToMasz [EMAIL PROTECTED] wrote:
... how much should I increase these values to allow infinite
executions of external process?
That sounds like a bad idea. Long before you've run an infinite number
of processes, a real resource will be exhausted.
You are
Yes, each time the process is created, it remains.
os.waitpid(-1, os.WNOHANG) doesn't work before starting the process
for the first time.
I tried this:
pid = os.fork()
if pid == 0:
os.execl('ext_script.py','ext_script.py')
else:
(pid,status) = os.waitpid(pid, 0)
It seems to work
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
see the help for ulimit (builtils) :
-$ help limit
--
http://mail.python.org/mailman/listinfo/python-list
Quoth ToMasz [EMAIL PROTECTED]:
| 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