spawnv/spawnl do not return an "R" process state code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nushin

    spawnv/spawnl do not return an "R" process state code

    Greetings,

    I am running RedHat 7.3 and trying to spawn a hello.py program from
    hello_driver.py by using spawn*( ) API, as a P_NOWAIT :

    os.spawnv(os.P_ NOWAIT,'/usr/bin/python',('pytho n hello.py >/dev/null
    &'))

    and when i check the process state code of hello.py by:
    ps -aux

    i see that it's in Z (Zombie) state.

    If i use spawnl( ), instead of spawnv, i get hello.py running in "S"
    (sleep) state. i.e.,
    os.spawnv(os.P_ NOWAIT,'/usr/bin/python',('pytho n hello.py >/dev/null
    &'))

    How can i use spawn*( ) so that hello.py runs in normal process state
    code of "R"?

    I am using Python 2.2.2., and hello.py prints "hello world" a million
    times.

    Regards,
    Nushin
Working...