Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python
return codes from os.spawn
 

Index | Next | Previous | View Flat


nirmaljs at lasonindia

Sep 17, 2007, 4:17 AM


Views: 87
Permalink
return codes from os.spawn

Hi,

When I try running java through os.spawnv with P_NOWAIT, it returns the
process id

>>> os.spawnv(os.P_NOWAIT, '$JAVA_HOME/bin', ('java', '$JAVA_HOME/bin/java
ex3178 true'))
19524

then I removed the command line parameter in the java command to fail ( it
should throw an exception) the process and ran it. This time also it
returned the process id .

>>> os.spawnv(os.P_NOWAIT, '$JAVA_HOME/bin', ('java', '$JAVA_HOME/bin/java
ex3178'))
21947


And I tried the same by using P_WAIT and it returned the same exit code

>>> os.spawnv(os.P_WAIT, '$JAVA_HOME/bin', ('java', '$JAVA_HOME/bin/java
ex3178 true))
127
>>> os.spawnv(os.P_WAIT, '$JAVA_HOME/bin', ('java', '$JAVA_HOME/bin/java
ex3178'))
127


please let me know how can we identify that the process is completed
successfully or not ?

Thanks,
Nirmal




--
http://mail.python.org/mailman/listinfo/python-list

Subject User Time
return codes from os.spawn nirmaljs at lasonindia Sep 17, 2007, 4:17 AM
    Re: return codes from os.spawn gagsl-py2 at yahoo Sep 17, 2007, 12:16 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.