bug-bash
[Top][All Lists]
Advanced

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

Re: Procsub.tests on OSes using named pipes


From: Chet Ramey
Subject: Re: Procsub.tests on OSes using named pipes
Date: Sat, 15 Feb 2020 14:43:56 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 2/13/20 5:00 AM, CHIGOT, CLEMENT wrote:
> Hi, 
> 
> procsub.tests is failing on OSes using named pipes (like AIX). 
> As far as I understand, with named pipes, the temporary file (sh-np*) is 
> suppressed once it has been read, therefore every attempts to read the same 
> input will fail with ENOENT. It seems to be the case in "count_lines" 
> function. 

Pretty much true. Once the data in the pipe has been read and the process
writing to (or reading from) the named pipe has terminated, the shell reaps
the process and removes the named pipe. We don't want to leave stray FIFOs
in the file system.

(That's the real problem with using FIFOs for this: they exist in the file
system and aren't private to the process like file descriptors and
/dev/fd.)

However, the handler for named pipes has been commented and I haven't found
why. Is there any reason behind that ? If no, here is a patch fixing
procsub.tests.

It probably should be. Thanks for the patch.

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



reply via email to

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