Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6917913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:47:31+00:00 2026-05-27T09:47:31+00:00

popen() alternative – I am using the accepted answer (pipe/fork/exec method) to solve my

  • 0

popen() alternative – I am using the accepted answer (pipe/fork/exec method) to solve my issue. Only difference is, instead of execl, I am using execv.

Now, my question is, does parent process have any control over child process created by execv? Lets say this whole sequence suggested in accepted answer is for tailing 1 file and I have many such files; I put this whole sequence in a function and if I call this function many times, at a point in time, is it possible to have many child tail processes around?

What I want to know is,
1) Can I have multiple child processes running at any point in time?
2) how does child processes (created by execv) terminate? after execv call does parent know when child process (created by execv) is done/terminated? – answered.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:47:31+00:00Added an answer on May 27, 2026 at 9:47 am

    If you have a pipe from the child’s stdout, you can often avoid signal/wait aggravation by just watching for the pipe to get EOF. You still have to reap the child to avoid zombies though http://en.wikipedia.org/wiki/Zombie_process (if you don’t care about the child’s exit status, this is normally done with a double fork so you run your real subprocess as a grandchild and reap the intermediate child). The GLib code is the most complex possible example probably: http://git.gnome.org/browse/glib/tree/glib/gspawn.c#n1191

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a very strange issue with Python's subprocess.Popen. I'm using it to call
popen buffers output while system does not. is that the only difference? I understand
Say I write this: from subprocessing import Popen, STDOUT, PIPE p = Popen([myproc], stderr=STDOUT,
I create a subprocess using subprocess.Popen() that runs for a long time. It is
I am trying to use IO.popen in order to put (with .puts method) and
I am using popen to start a C++ slave program from a master program.
code: proc=subprocess.Popen(['sh',shFile],stderr=subprocess.PIPE,stdout=subprocess.PIPE) out,err = proc.communicate() Problem: shFile in line 1 runs several shell scripts.
I am using popen to execute a command under linux, then 4 process wile
I'm using os.popen() in order to run a few commands. This is what man
I am using popen to execute a command and the problem is that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.