bug-bash
[Top][All Lists]
Advanced

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

Re: Bad file descriptor with pipeline


From: Chet Ramey
Subject: Re: Bad file descriptor with pipeline
Date: Mon, 11 Apr 2016 22:00:30 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/11/16 5:39 PM, Hédy GIRAUDEAU wrote:
> Hi,
> If i use : `strace bash -c "echo qsd | cat" 2>&1 | grep "close"`
> I get systematically :
> 
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(3)                                = 0
> close(4)                                = 0
> close(4)                                = -1 EBADF (Bad file descriptor)
> close(3)                                = 0
> close(3)                                = -1 EBADF (Bad file descriptor)
> 
> 
> I don't know if it's a bug or not. This error happens everytime a
> pipeline is used.

It's not a bug, it's bash making sure pipe file descriptors are closed.

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



reply via email to

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