[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "read -s -n999 -t0.01 key" hangs until keypress
From: |
Chet Ramey |
Subject: |
Re: "read -s -n999 -t0.01 key" hangs until keypress |
Date: |
Thu, 12 Oct 2023 11:20:34 -0400 |
User-agent: |
Mozilla Thunderbird |
On 10/12/23 6:18 AM, Bodo Thiesen wrote:
Hello list.
The following script can be used to reproduce the problem. It seems to be
related to sub-processes terminating at the "wrong" moment. The symptom:
The script runs for some time counting up until at some moment the script
hangs in the read function. Once this happens, the timeout is no longer
respected at all. Only a keypress frees the script again.
I haven't been able to reproduce this yet. I let the script run through
around 105,000 iterations without a hang before I killed it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/