On 9/4/05, Karol Banczyk <[EMAIL PROTECTED]> wrote:
> Hello,
>        I'm solving an exercise from my school. Not to go into details - the
> task is to create a initiating process which in turn starts three new
> processes  and then finishes its work. The three processes are to
> communicate with pipes. There's no problem till this stage. But there's
> the catch. The first of the three processes has to get its input from
> the standard input and this works only as long as the parent
> (initiating) process is alive. When the parent finishes the standard
> input goes back to bash and the orphaned processes are adopted by the
> init process having no access to stdin.

This is what I would expect.  As long as the parent is running child
processes are attached to the process group's controlling terminal and
will be detached automatically when the parent is terminated.

Normally, the parent should wait (waitpid) for its childs to prevent
them of becoming orphans.  Are you waiting for them?

It would be easier to help if you would let us know what the exercise is.  


Regards

        \Steve

--

Steve Graegert <[EMAIL PROTECTED]>
Software Consultancy {C/C++ && Java && .NET}
Mobile: +49 (176)  21248869
Office: +49 (9131) 7126409
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" 
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to