mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
daemon.Spawn dropped its Wait's error and kept only the ProcessState. When Wait can't reap the process (wait4 fails, as when something else reaped it), there is no state: Exit then said "<nil>" and ExitSignal dereferenced a nil state, which would have panicked the proxy's broker in sandboxFailed. Handle.reaped now keeps Wait's error when there's no state, Exit names it, and ExitCode and ExitSignal answer -1 and 0. devvm desktop's sshChannel.Close dropped ssh's Wait error. An ssh that ends on its own with a failure, such as 255 when the VM drops the connection, now goes in the run log once and is Close's error; one that Close killed after channelClose, or that the dial's context killed as devvm desktop ends, isn't, as its end is the kill. startChannel, split from dial, starts any command as a channel, for the test. Tests: TestHandleReaped (fails without the nil-state handling: "<nil>" and a nil-pointer panic), TestDesktopChannelClose (fails without Close keeping Wait's error). Co-Authored-By: Claude Opus 5.5 <[email protected]>