My bash script stopped working (hangs) after upgrading to v3.7
Given this script:
#!/bin/bash
# https://github.com/koalaman/shellcheck/wiki/SC2044
while IFS= read -r -d '' file; do
echo -n checking "${file}"
# This works on alpine 3.6 but hangs on 3.7 and edge.
if stat -c %F "${file}" | grep -qE '^directory$'; then
echo " DIRECTORY"
else
echo
fi
done < <(find /etc -maxdepth 1 -print0)
It works on alpine 3.6.
However, it hangs on alpine 3.7 and edge after it prints
checking /etc
.
(from redmine: issue id 8236, created on 2017-12-04, closed on 2017-12-12)
- Changesets:
- Revision ffcbff62 by Natanael Copa on 2017-12-07T22:18:05Z:
main/bash: fix overflow in jobs
fixes #8236
- Revision 3239e62f by Natanael Copa on 2017-12-07T22:25:19Z:
main/bash: fix overflow in jobs
fixes #8236
ref: https://github.com/tianon/docker-bash/issues/4
ref: https://github.com/gliderlabs/docker-alpine/issues/363