473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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


Sep 17 '07 #1
0 1247

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nushin | last post by:
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',('python hello.py...
7
by: C Gillespie | last post by:
Dear All, I have a function def printHello(): fp = open('file','w') fp.write('hello') fp.close() I would like to call that function using spawn or fork. My questions are:
6
by: Josh Mcfarlane | last post by:
I keep trying to get myself out of the return-code mindset, but it doesn't seem to work. They are suppose to get rid of if-then statements of return codes, but you still have to do an if statement...
16
by: Fao, Sean | last post by:
As far as I can tell, the standard has defined three portable return codes from function main() (0, EXIT_SUCCESS, EXIT_FAILURE). Personally, on all platforms I have worked with, EXIT_SUCCESS is,...
3
by: c# beginner | last post by:
we are trying to standardize return codes across our .NET applications (that are soon to be developed.) What is the best practice for standardizing return codes? I know of only the following...
5
by: Paul Hasell | last post by:
Hi, I'm trying to invoke a web method asynchronously but just can't seem to get it to tell me when it has finished! Below is the code I am (currently) using: private void...
3
by: RdS | last post by:
Where do I find return codes for MS methods. For instance the filesystemobject methods. I need to know what methods return (error codes, etc. and what they mean). I have searched MSDN and of...
24
by: Earl | last post by:
I have all of my data operations in a separate library, so I'm looking for what might be termed "best practices" on a return type from those classes. For example, let's say I send an update from...
3
by: asearle | last post by:
Hallo everyone, I have a perl script which can return error codes. I have done this with, for example, 'exit 11;', which would (I imagine) send the exit code 11 (instead of 0) back to the calling...
3
by: somuchh8 | last post by:
Hi, I'm having a lot of trouble with the Win32::Spawn module in perl. Here is my situation, I have a Win32::Spawn call which looks like this: my $success = undef; my $cmdline =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.