WIP: Added timeout on read function #6

Draft
Ghost wants to merge 3 commits from timeout-read into master
First-time contributor

Created timedout_read() function which uses TMOUT env variable, inspired by http://www.tldp.org/LDP/abs/html/internalvariables.html#TIMEOUT

Created timedout_read() function which uses TMOUT env variable, inspired by http://www.tldp.org/LDP/abs/html/internalvariables.html#TIMEOUT
benpro added a new dependency 2019-02-15 16:15:56 +01:00
Ghost requested changes 2019-02-15 16:27:45 +01:00
Ghost left a comment
Author
First-time contributor

Remember to run shellcheck, besides that it seems to run fine on OpenBSD.

Remember to run shellcheck, besides that it seems to run fine on OpenBSD.
@ -66,0 +71,4 @@
user_input=$1
old_tty_settings=$(stty -g)
stty -icanon min 0 time ${TMOUT}0
read $user_input
Author
First-time contributor

10:2: note: read without -r will mangle backslashes. [SC2162]

10:7: note: Double quote to prevent globbing and word splitting. [SC2086]

10:2: note: read without -r will mangle backslashes. [SC2162] 10:7: note: Double quote to prevent globbing and word splitting. [SC2086]
Author
First-time contributor

Strange that it didn't erase the review automatically.

Strange that it didn't erase the review automatically.
Ghost changed title from Added timeout on read function to WIP: Added timeout on read function 2019-03-08 11:57:06 +01:00
Author
First-time contributor

Need to be tested on OpenBSD and regular shell.

Need to be tested on OpenBSD and regular shell.
Author
First-time contributor

So should this function be killing my xterm after a while?

So should this function be killing my xterm after a while?
This pull request has changes conflicting with the target branch.
  • evomaintenance.sh
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b timeout-read master
git pull origin timeout-read

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff timeout-read
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Depends on
#2 Timeout for evomaintenance
evolix/evomaintenance
Reference: evolix/evomaintenance#6
No description provided.