Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > return codes from os.spawn

Reply
Thread Tools

return codes from os.spawn

 
 
Nirmal
Guest
Posts: n/a
 
      09-17-2007
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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to write codes to connect access database using html codes hiralcp Software 0 12-18-2007 08:49 PM
How to use file I/o codes with form and controls codes Allen ASP .Net 1 12-03-2007 12:04 AM
Virtual Key Codes, Scan Codes and ASCII Codes in C gj_williams2000@yahoo.co.uk C Programming 2 08-20-2005 11:04 AM
RegEx replace of html codes to ascii codes Greg -- ASP .Net 4 08-09-2005 07:27 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM



Advertisments