tmo fallback fails when the caller's stdin is closed
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 32/100
Research direction
The fix lands in the tmo wrapper script, at the point where it saves stdin with exec 3<&0 before backgrounding; read that block first, then the existing no-timeout fallback case in tests/portable.sh. Add the /dev/null fallback there and extend that test with a 0<&- case. Done looks like threads.sh list --json 0<&- returning [] with neither timeout nor gtimeout installed. Note a pull request (#198) is already open for this, so coordinate before starting.
Written by the indexing model from the issue text.
Description
From the gate on https://github.com/STRML/autodream/pull/196 (round 3, non-blocking). With neither timeout nor gtimeout installed, tmo now saves stdin with exec 3<&0 before backgrounding the command. If the caller closed stdin (0<&-), that exec fails and the command never starts: threads.sh list --json 0<&- reports a jq failure, while the same call with timeout available returns [].
Fix: fall back to /dev/null when stdin is closed (exec 3<&0 2>/dev/null || exec 3</dev/null), with a test in tests/portable.sh beside the existing fallback case. Landing in the autodream web part 2 PR.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 2
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 26
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from STRML/autodream
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 62/100
STRML/autodream#192 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
humblemuzzu/dumbtv#206 ·
Maintainers usually reply within 2 days
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug infrastructure testing
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
agens-field/nuvrail#217 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
fosrl/windows-linux#91 ·
Maintainers usually reply within 1 day