We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oils 0.23.0 installed with brew install --quiet oils-for-unix.
brew install --quiet oils-for-unix
This code works fine in almost all shells.
Code:
my_func1() { echo 'Sample text' return 0 } my_func2() { echo 'Sample text' return 5 } my_func3() { echo 'Sample text' sleep 6 } my_func_timeout() { local _sec_limit _pid _sec_limit=3 "${1}" & _pid="${!}" while test "$((_sec_limit = _sec_limit - 1))" -ge 0; do sleep 1 if kill 2> /dev/null -0 "${_pid}"; then echo 1>&2 'Still running' else wait "${_pid}" || return "${?}" return '0' fi done kill 1>&2 "${_pid}" return 124 } echo '---' my_func_timeout 'my_func1' echo "Return value: ${?}" echo '---' my_func_timeout 'my_func2' echo "Return value: ${?}" echo '---' my_func_timeout 'my_func3' echo "Return value: ${?}" echo '---'
Instead on Oils it output:
--- Sample text [%1] PID 3240 Done wait "${_pid}" || return "${?}" ^ /Users/runner/work/codecov-test/codecov-test/tools/bits-info.sh:32: 3240 isn't a child of this shell Return value: 127 --- Sample text [%1] PID 3244 Done wait "${_pid}" || return "${?}" ^ /Users/runner/work/codecov-test/codecov-test/tools/bits-info.sh:32: 3244 isn't a child of this shell Return value: 127 --- Sample text Still running Still running Still running Return value: 124 ---
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Oils 0.23.0 installed with
brew install --quiet oils-for-unix
.This code works fine in almost all shells.
Code:
Instead on Oils it output:
The text was updated successfully, but these errors were encountered: