Skip to content

v0.1.1: ExecProcess stdin fix (hotfix)

Choose a tag to compare

@kolkov kolkov released this 03 Dec 09:28
· 28 commits to main since this release

What's Fixed

ExecProcess stdin conflict without Alt Screen

This hotfix resolves a critical bug where running ExecProcess() without Alt Screen mode caused stdin race conditions with child processes.

Problem

When ExecProcess() was called without alt screen, the inputReader goroutine remained blocked in Read(), creating a race condition for stdin access. This caused issues with interactive commands like vim, ssh, python.

Solution

  • Added CancelableReader wrapper with channel-based cancellation support
  • stopInputReader() now calls Cancel() to immediately unblock any pending reads
  • Fixed goroutine defer to properly clean up state on natural exit (EOF)

Reported by

GoSh Shell Project


Full Changelog: v0.1.0...v0.1.1