exec

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2013 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Some execution facilities, because Gate relies a lot on process spawning

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(prepare func(cmd *Cmd) error, run func(cmd *Cmd) error, command string, arguments ...string) (err error)

Spawn a given command.

  • prepare() is called after the command creation but before actually starting it
  • run() is called while the command is running and before waiting for its completion

Types

type Cmd

type Cmd exec.Cmd

func (*Cmd) StderrPipe

func (self *Cmd) StderrPipe() (io.ReadCloser, error)

A pipe to the command's stderr

func (*Cmd) StdinPipe

func (self *Cmd) StdinPipe() (io.WriteCloser, error)

A pipe to the command's stdin

func (*Cmd) StdoutPipe

func (self *Cmd) StdoutPipe() (io.ReadCloser, error)

A pipe to the command's stdout

Jump to

Keyboard shortcuts

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