spawnv( ) or spawnl( ) do not launch a normal running process in Python 2.2.2?

nushin nushin2 at
Tue Aug 5 19:56:14 CEST 2003

Patrick Useldinger <pu> wrote in message news:<3f2ec9dd$1_2 at>...
> nushin wrote:
> > os.spawnv(os.P_NOWAIT,'/usr/bin/python',('python >/dev/null
> > &'))
> > 
> > 
> > os.spawnl(os.P_NOWAIT,'/usr/bin/python',('python >/dev/null
> > &'))
> Did you try *without* the redirections?

Yes, i did try *without* redirections, the process doesn't run in
normal *R* state. In addition to this bug, if you try to launch the
program with P_WAIT parameter, you always get pid 127 back, and pid
127 can not be found in the system. You may try this as:
pid = os.spawnv(os.P_WAIT,'/usr/bin/python',(' python '))
print " is launched as pid# ",pid

and it always returns pid# 127. This proves that this API is not
functioning properly. Please correct me if i am wrong. I am using
Linux RedHat 7.2 and Python 2.2.2.

I use *os.popen()* API to launch program and it works
properly and runs in state code of *R*.

Could someone confirm os.spawnv/spawnl API bugs in Python 2.2.2/Redhat


More information about the Python-list mailing list