
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
|