shell

package
v1.5.17 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSystemShellPath

func GetSystemShellPath(path string) []string

GetSystemShellPath - Find bash or sh

func Start

func Start(command string) error

Start - Start a process

Types

type Shell

type Shell struct {
	ID      uint64
	Command *exec.Cmd
	Stdout  io.ReadCloser
	Stdin   io.WriteCloser
	Cancel  context.CancelFunc
}

Shell - Struct to hold shell related data

func StartInteractive

func StartInteractive(tunnelID uint64, command []string, enablePty bool) (*Shell, error)

StartInteractive - Start a shell

func (*Shell) Start added in v1.5.14

func (s *Shell) Start() error

Start - starts a command

func (*Shell) Stop added in v1.5.15

func (s *Shell) Stop()

Stop - stopping the command (syskill) using context cancel

func (*Shell) Wait added in v1.5.14

func (s *Shell) Wait() error

Wait - waits till the command finish

Directories

Path Synopsis
Package pty provides functions for working with Unix terminals.
Package pty provides functions for working with Unix terminals.

Jump to

Keyboard shortcuts

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