{"modulePath":"github.com/2lambda123/git-lfs","version":"v2.5.2+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package subprocess\n\nPackage subprocess provides helper functions for forking new processes NOTE: Subject to change, do not rely on this package from outside git-lfs source\n\n## Functions\n\n```go\nfunc Output(cmd *Cmd) (string, error)\n```\n\n```go\nfunc SimpleExec(name string, args ...string) (string, error)\n```\nSimpleExec is a small wrapper around os/exec.Command.\n\n```go\nfunc Trace(name string, args ...string)\n```\n\n## Types\n\n```go\ntype BufferedCmd struct {\n\t*Cmd\n\n\tStdin  io.WriteCloser\n\tStdout *bufio.Reader\n\tStderr *bufio.Reader\n}\n```\n\n```go\nfunc BufferedExec(name string, args ...string) (*BufferedCmd, error)\n```\nBufferedExec starts up a command and creates a stdin pipe and a buffered stdout \u0026 stderr pipes, wrapped in a BufferedCmd. The stdout buffer will be of stdoutBufSize bytes.\n\n```go\ntype Cmd struct {\n\t*exec.Cmd\n\t// contains filtered or unexported fields\n}\n```\nThin wrapper around exec.Cmd. Takes care of pipe shutdown by keeping an internal reference to any created pipes. Whenever Cmd.Wait() is called, all created pipes are closed.\n\n```go\nfunc ExecCommand(name string, arg ...string) *Cmd\n```\nExecCommand is a small platform specific wrapper around os/exec.Command\n\n```go\nfunc (c *Cmd) StderrPipe() (io.ReadCloser, error)\n```\n\n```go\nfunc (c *Cmd) StdinPipe() (io.WriteCloser, error)\n```\n\n```go\nfunc (c *Cmd) StdoutPipe() (io.ReadCloser, error)\n```\n\n```go\nfunc (c *Cmd) Wait() error\n```\n\n```go\ntype Tty struct {\n\t// contains filtered or unexported fields\n}\n```\nTty is a convenience wrapper to allow pseudo-TTYs on \\*nix systems, create with NewTty() Do not use any of the struct members directly, call the Stderr() and Stdout() methods Remember to call Close() when finished\n\n```go\nfunc NewTty(cmd *exec.Cmd) *Tty\n```\nNewTty creates a pseudo-TTY for a command and modifies it appropriately so the command thinks it's a real terminal\n\n```go\nfunc (t *Tty) Close()\n```\n\n```go\nfunc (t *Tty) Stderr() (io.ReadCloser, error)\n```\n\n```go\nfunc (t *Tty) Stdout() (io.ReadCloser, error)\n```\n\n","path":"github.com/2lambda123/git-lfs/subprocess","name":"subprocess","synopsis":"Package subprocess provides helper functions for forking new processes NOTE: Subject to change, do not rely on this package from outside git-lfs source","isRedistributable":true}
