Hello!
If I use timeout with read shell command, next read command use it too.
See my test shell program:
#!/bin/bash
read -rest 2
od -An -tx1 <<<"${REPLY}"
read -ren2 -p $'-----------------------------------\nIs this OK? [y/N] '
echo
od -An -tx1 <<<"${REPLY}"
[ x"${REPLY,}" != x'y' ] && exit 1
exit 0
In second read command I not use timeout, but have 2s timeout from
first read setting.
bash-5.2.9-3.fc37.x86_64
GNU bash, version 5.2.9(1)-release (x86_64-redhat-linux-gnu)
How reproducible:
See my test script.
Expected results:
The second read is independent of the first.
Additional info:
This problem since bash-5.2. 5.1 versions is OK.
Thanks