Re: How to make A be the child process of B?
From: Artie Gold (artiegold_at_austin.rr.com)
Date: 08/28/03
- Next message: Floyd Davidson: "Re: How to make A be the child process of B?"
- Previous message: Artie Gold: "Re: [Newbie] system() call"
- In reply to: K.S.Liang: "How to make A be the child process of B?"
- Next in thread: Floyd Davidson: "Re: How to make A be the child process of B?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Aug 2003 04:46:04 GMT
K.S.Liang wrote:
> Hi there,
>
> fork() can create the child process, but both the parent and child
> processes are from the same executable binary.
Well yes. Initially at least.
To run a different program, after you fork(), you call one of the
exec*() family of functions to overlay the process with a different
executable.
That's the way all processes (with the exception of `init') are created.
> Is there any way to
> make program A be the child process of process B? Or how can I make
> process A be the child process of process B at runtime if I have both
> process IDs?
Erm, no.
HTH,
--ag
-- Artie Gold -- Austin, Texas
- Next message: Floyd Davidson: "Re: How to make A be the child process of B?"
- Previous message: Artie Gold: "Re: [Newbie] system() call"
- In reply to: K.S.Liang: "How to make A be the child process of B?"
- Next in thread: Floyd Davidson: "Re: How to make A be the child process of B?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|