mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
Return proper exit code on ssh with TTY (#3192)
* Return proper exit code on ssh with TTY Signed-off-by: Spike Curtis <spike@coder.com> * Fix revive lint Signed-off-by: Spike Curtis <spike@coder.com> * Fix Windows exit code for missing command Signed-off-by: Spike Curtis <spike@coder.com> * Fix close error handling on agent TTY Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
+10
@@ -29,6 +29,16 @@ type PTY interface {
|
||||
Resize(height uint16, width uint16) error
|
||||
}
|
||||
|
||||
// Process represents a process running in a PTY
|
||||
type Process interface {
|
||||
|
||||
// Wait for the command to complete. Returned error is as for exec.Cmd.Wait()
|
||||
Wait() error
|
||||
|
||||
// Kill the command process. Returned error is as for os.Process.Kill()
|
||||
Kill() error
|
||||
}
|
||||
|
||||
// WithFlags represents a PTY whose flags can be inspected, in particular
|
||||
// to determine whether local echo is enabled.
|
||||
type WithFlags interface {
|
||||
|
||||
Reference in New Issue
Block a user