Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How do I get the process id when starting a process using os.popen2 or os.popen3 on linux?

Reply
Thread Tools

How do I get the process id when starting a process using os.popen2 or os.popen3 on linux?

 
 
mikem76@gmail.com
Guest
Posts: n/a
 
      06-07-2006
Is there a way to get the process id when starting a process using
os.popen2 or os.popen3 on linux?

Mike

 
Reply With Quote
 
 
 
 
Fredrik Lundh
Guest
Posts: n/a
 
      06-07-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Is there a way to get the process id when starting a process using
> os.popen2 or os.popen3 on linux?


on Unix, os.popen2/popen3 uses functions and classes from the popen2
module. they return file objects attached to the process, but there's
no (non-hacky) way to get at the process itself.

if you need more control over the subprocess, you can use the classes in
the popen2 module, or, better, the subprocess module.

</F>

 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C Programming 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
Killing and Starting IIS and a VB.Net process using ASP.Net Shruti A via .NET 247 ASP .Net 0 05-15-2004 10:54 AM



Advertisments