package conpty
import "github.com/Microsoft/hcsshim/internal/conpty"
Index ¶
- type Pty
- func Create(width, height int16, flags uint32) (*Pty, error)
- func (c *Pty) Close() error
- func (c *Pty) InPipe() *os.File
- func (c *Pty) OutPipe() *os.File
- func (c *Pty) Read(buf []byte) (int, error)
- func (c *Pty) Resize(width, height int16) error
- func (c *Pty) UpdateProcThreadAttribute(attrList *windows.ProcThreadAttributeListContainer) error
- func (c *Pty) Write(buf []byte) (int, error)
Types ¶
type Pty ¶
type Pty struct {
// contains filtered or unexported fields
}
Pty is a wrapper around a Windows PseudoConsole handle. Create a new instance by calling `Create()`.
func Create ¶
Create returns a new `Pty` object. This object is not ready for IO until `UpdateProcThreadAttribute` is called and a process has been started.
func (*Pty) Close ¶
Close closes the pseudo-terminal and cleans up all attached resources
func (*Pty) InPipe ¶
InPipe returns the input pipe of the pseudo console.
func (*Pty) OutPipe ¶
OutPipe returns the output pipe of the pseudo console.
func (*Pty) Read ¶
Read reads from the pseudo console into `buf`. Returns the number of bytes read and an error if there is one.
func (*Pty) Resize ¶
Resize resizes the internal buffers of the pseudo console to the passed in size
func (*Pty) UpdateProcThreadAttribute ¶
func (c *Pty) UpdateProcThreadAttribute(attrList *windows.ProcThreadAttributeListContainer) error
UpdateProcThreadAttribute updates the passed in attribute list to contain the entry necessary for use with CreateProcess.
func (*Pty) Write ¶
Write writes the contents of `buf` to the pseudo console. Returns the number of bytes written and an error if there is one.
Source Files ¶
- Version
- v0.13.0 (latest)
- Published
- Apr 21, 2025
- Platform
- windows/amd64
- Imports
- 7 packages
- Last checked
- 3 hours ago –
Tools for package owners.