-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
sort opens too many files #5714
Copy link
Copy link
Open
Labels
Description
With our implementation:
mkdir -p in
for i in $(seq 5); do
echo $i >in/$i
done
(seq 6 && echo 6) >exp
echo 6 >out
(exec 3<&- 4<&- 5<&- 6<&- 7</dev/null 8<&7 9<&7 &&
ulimit -n 10 &&
sort -n -m --batch-size=7 -o out out in/1 in/2 in/3 in/4 in/5 out
)
returns:
sort: failed to open temporary file: Too many open files
GNU works without issue
Tested by GNU in tests/sort/sort-merge-fdlimit.sh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status