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: Adam Danischewski
Subject: Re: Open pipe passed to child process
Date: Wed, 24 Aug 2016 17:04:17 -0400

Actually I misspoke before, there is this issue on Solaris 10. I didn't update the logic sufficiently to detect it at first. So it looks like this is could be a potentially more significant issue -- affecting enterprise user markets. 

I think the bottom line question is, should a child process be capable of manipulating the parent processes pipe data. My vote is that it should not be allowed, since I do not want things like a squirrely child process eating up parent pipe data in my while/read loops. There may be important tasks that are subsequent that I would not want a child process to short-circuit.

On Wed, Aug 24, 2016 at 2:52 PM, Adam Danischewski <address@hidden> wrote:
Let's put aside the fs type for second and talk about what data should be there and what should and shouldn't happen. 

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.

I have tested this out in Solaris 10, and this does not happen there, although fd0 does appear to be a pipe (parents pipe?). You may want to look at the differences between the Solaris Bash code and Linux Bash code.

On Wed, Aug 24, 2016 at 2:09 PM, Chet Ramey <address@hidden> wrote:
On 8/24/16 12:09 PM, Adam Danischewski wrote:
> I was expecting it to be the pts.

OK.  That's just not how it works.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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