bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open pipe passed to child process


From: Greg Wooledge
Subject: Re: Open pipe passed to child process
Date: Wed, 24 Aug 2016 15:03:56 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Aug 24, 2016 at 02:52:01PM -0400, Adam Danischewski wrote:
> When a parent script kicks off a child process, and the child process reads
> from fd0 I don't expect the child to be capable of manipulating the parents
> pipe data on fd0. An error potentially but not quietly eating up the
> parents fd0 pipe data. This seems to be violating a basic tenet.

Children inherit their parents' standard input.  This kind of contention
between processes for the input happens *all the time* if you don't
carefully avoid it.

http://mywiki.wooledge.org/BashFAQ/089 gives some examples, and some
workarounds.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]