Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardPty ¶
ForwardPty forwards: * terminal input (if any) of the calling process to the dstPty * dstPty terminal output to the calling process terminal * terminal windows size changes from the calling process to the dstPty The function takes ownership of dstPty. This function returns error if none of stdin, stdout, stderr of the calling process is a terminal (PtyNeeded returns false).
func PtyNeeded ¶
func PtyNeeded() bool
PtyNeeded returns true if any of the stdin, stdout, stderr is a terminal. For descriptors that are terminals, Sandbox needs to create own PTY instead of using the original, not sandboxed terminal.
func ReplaceTerminal ¶
ReplaceTerminal finds which of the stdin, stdout, stderr descriptors point to a terminal, and changes these descriptors to point to the new pseudoterminal ptyToUse.
func SetControllingTerminal ¶
SetControllingTerminal sets the pty as the controlling terminal for the current process. The process must be a session leader (call setsid() first).
Types ¶
This section is empty.