Documentation ¶
Index ¶
- Variables
- func IsAdmin() bool
- func Run(ctx context.Context, env map[string]string, exe string, args ...string) error
- func Start(ctx context.Context, env map[string]string, exe string, args ...string) (*dexec.Cmd, error)
- func StartInBackground(args ...string) error
- func StartInBackgroundAsRoot(ctx context.Context, args ...string) error
- func Terminate(p *os.Process) error
- func Wait(ctx context.Context, cancel context.CancelFunc, cmd *dexec.Cmd) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandContext = dexec.CommandContext //nolint:gochecknoglobals // OS-specific function replacement
Functions ¶
func Run ¶
Run will run the given executable with given args and env, wait for it to terminate, and return the result. The run will dispatch signals as appropriate for the given platform (SIGTERM and SIGINT on Unix platforms and os.Interrupt on Windows).
func Start ¶ added in v2.6.0
func Start(ctx context.Context, env map[string]string, exe string, args ...string) (*dexec.Cmd, error)
Start will start the given executable with given args and env,, and return the command. The signals are dispatched as appropriate for the given platform (SIGTERM and SIGINT on Unix platforms and os.Interrupt on Windows).
func StartInBackground ¶
func StartInBackgroundAsRoot ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.