shell

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

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
	Stderr  io.ReadCloser
	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

func (s *Shell) Start() error

Start - starts a command

func (*Shell) Stop

func (s *Shell) Stop()

Stop - stopping the command (syskill) using context cancel

func (*Shell) Wait

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