Skip to content

v0.6.3: Fix -stdin being blocked after a restart until Enter is pressed.

Choose a tag to compare

@github-actions github-actions released this 06 Feb 19:09
· 5 commits to main since this release
Closes #22.

os.Stdin.Read() blocks until a newline `\n` is provided (due to the OS doing
line-by-line buffering https://groups.google.com/g/golang-nuts/c/NvD-pOTASIk).
Therefore, do not tie the lifecycle of a command with os.Stdin.Read(). Instead,
read from os.Stdin continuously in a background goroutine and feed its data
into the stdinPipe of whichever exec.Cmd is currently running.