Documentation ¶
Overview ¶
Package binexec implements a wrapper for os/exec
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct { OsCmd *exec.Cmd // Cache if set to true the binary won't be deleted after execution. // If the ModTime of the cached binclude file changes the cache gets invalidated automtically. Cache bool }
Cmd same as Cmd in the os/exec package
func Command ¶
Command similar to Command in the os/exec package, but copies the executeable to run from bincludePath to the host os.
func CommandContext ¶
func CommandContext(ctx context.Context, fs *binclude.FileSystem, bincludePath string, arg ...string) (*Cmd, error)
CommandContext similar to CommandContext in the os/exec package but copies the executeable to run from bincludePath to the host os.
func (*Cmd) Run ¶
Run is similar to (*Cmd).Run() in the os/exec package, but deletes the executable at Cmd.Path if c.Cache is false
func (*Cmd) StderrPipe ¶
func (c *Cmd) StderrPipe() (io.ReadCloser, error)
StderrPipe same as (*Cmd).StderrPipe() in the os/exec package
func (*Cmd) StdinPipe ¶
func (c *Cmd) StdinPipe() (io.WriteCloser, error)
StdinPipe same as (*Cmd).StdinPipe() in the os/exec package
func (*Cmd) StdoutPipe ¶
func (c *Cmd) StdoutPipe() (io.ReadCloser, error)
StdoutPipe same as (*Cmd).StdoutPipe() in the os/exec package