osexec

package
v0.1.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(cmd string, args []string, env []string, logger log.Logger) ([]byte, error)

Execute command and return stdout/stderr

func ExecuteAs

func ExecuteAs(cmd string, args []string, uid int, gid int, env []string, logger log.Logger) ([]byte, error)

Execute command as a given UID and GID and return stdout/stderr

func ExecuteAsWithTimeout

func ExecuteAsWithTimeout(
	cmd string,
	args []string,
	uid int,
	gid int,
	timeout int,
	env []string,
	logger log.Logger,
) ([]byte, error)

Execute command with timeout as a given UID and GID and return stdout/stderr

func ExecuteWithTimeout

func ExecuteWithTimeout(cmd string, args []string, timeout int, env []string, logger log.Logger) ([]byte, error)

Execute command with timeout and return stdout/stderr

Types

This section is empty.

Jump to

Keyboard shortcuts

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