Re: Creating and killing processes

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 03/18/04


Date: Thu, 18 Mar 2004 13:15:37 +0100

Jens wrote:
>
> Question 1: Isn't it possible to launch an application from another
> application and then get completely detached just like Windows? This would
> probably resolve my problems.

fork twice let the intermediate process terminate
and have the parent wait at once for the
intermediate process.

>
> Question 2: Any clue as to why it get stuck and doesn't release the PID
> completely?

It is a zombie. A dead process cannot remove itself
from the task list, somebody else have to do. On
Unix the parent is responsible to do that, it is
done with one of the wait system calls that can do
a couple of things:

1) Wait for a child to terminate.
2) Collect the exist status of the child.
3) Remove the child from the task list.

The execve call doesn't change the parent/child
relationship. It only replaces the process image
of one of the processes with a new executable.

http://www.daimi.au.dk/~kasperd/comp.os.linux.development.faq.html#zombie

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaarep@daimi.au.dk
/* Would you like fries with that? */


Relevant Pages

  • Re: maximize child without covering parents menu
    ... maximize the child vi because it covers the menu of the parent vi. ... LabVIEW menus jsut as about everything else in LabVIEW ... except the window frame itself are not standard Windows objects. ...
    (comp.lang.labview)
  • Re: Configure 2 servers to resolve to each other?
    ... Craig made a post then I commented ... Who is the child and who is the parent? ... If the windows 2000 domain is a child of the Win2003 domain, ...
    (microsoft.public.win2000.dns)
  • Re: Child dialog and OK/Cancel handling
    ... >When searching for a window to handle input messages, Windows doesn't start with child windows, ... >the parent wants to handle messages of that type, ... >to your child dialog when the parent dialog has nothing ... I believe I had tested this and IsDialogMessage is called ...
    (microsoft.public.vc.mfc)
  • Re: Can a Forms parent be in another thread?
    ... Normaly windows procedures are not reentrant. ... You know that parent and child controls communicate by sending messages each ... > Does anybody know if the Parent of a form can safely be set to a form runing> in another thread? ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Creating and killing processes
    ... That will do the trick. ... > fork twice let the intermediate process terminate ... > Unix the parent is responsible to do that, ... > 2) Collect the exist status of the child. ...
    (comp.os.linux.development.apps)