[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Bad file descriptor with pipeline
From: Hédy_GIRAUDEAU <hedy.giraudeau () etu ! univ-nantes ! fr>
Date: 2016-04-12 4:27:25
Message-ID: 570C792D.90301 () etu ! univ-nantes ! fr
[Download RAW message or body]
Le 12/04/2016 04:00, Chet Ramey a écrit :
> 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.
>
Oh ok.
That's a odd way to make sure that a file descriptor is closed but at
least it works.
Sorry for disturbing.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic