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

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


Patrick Useldinger <pu> wrote in message news:<3f2ec9dd$1_2 at news.vo.lu>...
> nushin wrote:
> 
> > os.spawnv(os.P_NOWAIT,'/usr/bin/python',('python hello.py >/dev/null
> > &'))
> > 
> > 
> > os.spawnl(os.P_NOWAIT,'/usr/bin/python',('python hello.py >/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 hello.py '))
print "hello.py 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 hello.py program and it works
properly and hello.py runs in state code of *R*.

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

Regards,
Nushin




More information about the Python-list mailing list