473,668 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
Jul 18 '05 #1
0 1664

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

Similar topics

2
13715
by: wl | last post by:
Hi all, Pls help with the following: I have a stand-alone java program which will need to return a return-code to the running script. I thought I could just use: return -1; inside the "public static int main(String args)". However, I get an error. Apparently, I can only have "public static void main(String
1
7770
by: Tung Wai Yip | last post by:
I've build the following utility. It works so far but I want to make sure I'm doing the right thing. I am running Python 2.3 on windows 2000. def execute(cmd): """ execute cmd in sub-process, pipe output to stdout, return exit status (None means OK) """
2
7458
by: Paul Porcelli | last post by:
Hi folks, I have a perl one-liner embedded in a ksh script. perl -pi.bak -e "s/val/otherval/" inputfile I'd like to check the return code to know if the substitution was successful. If I type: # perl -pi.bak -e "s/val/otherval/" inputfile
0
1598
by: Paul Faulstich | last post by:
How can one exit the debugger with a non-zero return code? My perl script is called from another program which checks the return code. When I run it through the perl debugger, the debugger exits with a zero for its return code even if my script calls exit with a non-zero value. How can I pass the value from my script on when I quit from the debugger? Thanks,
3
14054
by: Ajay Garg | last post by:
I am running the following OSQL command and capturing the return code for the error .Whenver i have an error like server not exists or uable to login I get a return code of 1 for the %ERRORLEVEL%.However whenever I have an errorof a wrong dbcompatibility error the retun code id 1 even though sql returns an iformation message from OSQL that the right copatibilty levels are 60,70 and 80.How can i get OSQL to return the right return code...
11
2870
by: adi | last post by:
Dear all, This is more like a theoretical or conceptual question: which is better, using exception or return code for a .NET component? I had created a COM object (using VB6), which uses return code (not generating error/exception) so it is more compatible with other programming language.
4
3531
by: Jerry Orr | last post by:
I'm writing a simple JNI C++ function on a z/OS 1.4 system. I am attempting to rename a dataset; however, when I use the rename() function, I get a return code of -1. All of the return codes listed in the "C/C++ Runtime Library Reference" (EACCES, EINVAL, etc) are positive integers, and all of them can be successfully input into strerror() to get a valid error message. Passing -1 to strerror(), though, just returns a null string. Has...
2
1576
by: news.microsoft.com | last post by:
Hi I need to call a win32 application from windows form and get the return code from the win32 application. How can I do this? Thanks
10
15910
by: Tony | last post by:
I am running an application called AcroComm.exe to poll time clocks here at our company. I have written a small C# app that will poll the clocks based on information found in a DB. My problem is that AcroComm will sometimes stop polling in the middle of the process and terminate. The programing manual for the app says that it sends a code to the operating system when it is done that tells what has happend like the following: 0 ...
5
1737
by: Fir5tSight | last post by:
Hi All, I have a C#.NET code as follows: private void ScanInput_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { try { Row lRow = this.Connection.InsertScannedFile(ID);
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8382
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8802
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.