winpty

package
v0.0.0-...-955c50f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

winpty package is wrapper package for calling procedures of winpty.dll

winpty package is wrapper package for calling procedures of winpty.dll

Index

Constants

View Source
const (
	WINPTY_SPAWN_FLAG_AUTO_SHUTDOWN                 = 1
	NIL_POINTER_VALUE                               = 0
	DEFAULT_WINPTY_FLAGS                            = 0
	WINPTY_FLAG_IMPERSONATE_THREAD                  = 0x10
	CREATE_FILE_CREATE_MODE                         = syscall.OPEN_EXISTING
	CREATE_FILE_MODE                                = 0
	CREATE_FILE_ATTRS                               = 0
	CREATE_FILE_TEMPLATE                            = 0
	CONIN_FILE_ACCESS                               = syscall.GENERIC_WRITE
	CONOUT_FILE_ACCESS                              = syscall.GENERIC_READ
	STDIN_FILE_NAME                                 = "stdin"
	STDOUT_FILE_NAME                                = "stdout"
	WINPTY_ERROR_SPAWN_CREATE_PROCESS_FAILED uint32 = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IWinPTY

type IWinPTY interface {
	SetSize(ws_col, ws_row uint32) error
	Close() error
}

type WinPTY

type WinPTY struct {
	IWinPTY
	StdIn  *os.File
	StdOut *os.File
	// contains filtered or unexported fields
}

WinPTY contains handlers and pointers needed for launching winpty agent process

func Start

func Start(winptyDllFilePath, cmdLine string, window_size_cols, window_size_rows uint32, winptyFlag int32) (*WinPTY, error)

Start launches winpty agent as a separate process

func (*WinPTY) Close

func (winpty *WinPTY) Close() (err error)

Close closes stdin, stdout and winpty process handle.

func (*WinPTY) SetSize

func (winpty *WinPTY) SetSize(ws_col, ws_row uint32) (err error)

SetSize sets given console window size.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL