bug-bash
[Top][All Lists]
Advanced

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

Re: Some kind of file descriptor overflow


From: Jorge Sivil
Subject: Re: Some kind of file descriptor overflow
Date: Fri, 13 Jun 2014 15:56:31 -0300

Yes, sorry. The minimum reproduceable code is:

#!/bin/bash
function something() {
  while true
  do
    while read VAR
    do
      dummyvar="a"
    done < <(find "/run/shm/debora" -type f | sort)
    sleep 3
  done
}
something &

Which fails with many pipes fd open.

Changing the While feed to this:

#!/bin/bash
function something() {
  find "/run/shm/debora" -type f | sort | while true
  do
    while read VAR
    do
      dummyvar="a"
    done
    sleep 3
  done
}
something &

Works completely normal.

However, removing the call as function in background:

#!/bin/bash
while true
do
  while read VAR
  do
    dummyvar="a"
  done < <(find "/run/shm/debora" -type f | sort)
  sleep 3
done

But executing the script with ./test.sh & (in background), works
without problems too.

On Fri, Jun 13, 2014 at 2:35 PM, Eduardo A. Bustamante López
<address@hidden> wrote:
> On Fri, Jun 13, 2014 at 09:52:49AM -0300, Jorge Sivil wrote:
>> The script is in the answer:
>>
>> http://stackoverflow.com/questions/24192459/bash-running-out-of-file-descriptors
> Can't you reduce the script to a minimum reproducible case? To be
> honest, it smells like a scripting error and not a bug, but the code
> in that answer is too large and with too many dependencies to be even
> worth the time to execute.



-- 
Atte.: Jorge Sivil



reply via email to

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