Documentation
¶
Overview ¶
Package platform contains the small amount of process behaviour that is inherently operating-system specific. Keeping it outside the session package makes the PTY lifecycle compile cleanly on unsupported platforms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrShellUnsupported = errors.New("shell execution not supported on this platform")
ErrShellUnsupported reports that the current platform has no supported system shell launcher for PTY-backed sessions.
Functions ¶
func IsPTYCloseError ¶
IsPTYCloseError recognizes the EIO returned by many Unix PTY masters after the slave side has closed.
func KillProcessGroup ¶
KillProcessGroup forcefully stops the process group and then kills the leader as a fallback in case group signalling failed.
func NewShellCommand ¶
NewShellCommand constructs the explicitly requested Unix shell invocation. The script is passed as one argument; it is never interpolated by Relayer.
func ProcessGroupExists ¶
ProcessGroupExists reports whether the command's process group still exists.
func TerminateProcessGroup ¶
TerminateProcessGroup asks the whole process group led by command to stop. creack/pty starts commands in a new session on Unix, so the command PID is also the process-group ID.
Types ¶
This section is empty.