cmd
cmd copied to clipboard
Non-blocking external commands in Go with streaming output
github.com/go-cmd/[email protected]: invalid version: should be v0 or v1, not v2
Hey, thank you so much for the hard work building this package! I have created a function that takes command and run it, and prints the stdout/stderr live. I have...
This adds a public method, cmd.SendSignal, that allows sending a signal to a process and, optionally, to the entire process group. Internally, terminateProcess is replaced by signalProcess.
I've got a use case where I don't necessarily want to terminate an entire process group (i.e. having children outlive the parent is desired). If you're open to such a...
Additional feature that allows the buffered output to have stdout and stderr combined into the same buffer which provides a capability to easily dump the buffered output to a log...
I'm using exec.Cmd() to run graphics magick to convert an image, reading from stdin and writing to stdout. ```go stdout := bytes.Buffer{} stderr := bytes.Buffer{} gm := exec.Command("gm", "convert", args...)...
when i use Options ``` package main import ( "fmt" "github.com/go-cmd/cmd" "os/exec" "syscall" ) func main() { opt := cmd.Options{ Streaming: true, BeforeExec: []func(cmd *exec.Cmd){ func(cmd *exec.Cmd) { cmd.SysProcAttr =...
When programs on Windows are terminated the child processes will not be killed anymore.
Thanks for maintaining go-cmd. I've got a C program that get's started with `stdin`. This allows the Go code to send instructions over `stdin` to the C program. However if...
I know the standard os/exec lib has a function called CombinedOutput. Can go-cmd do something similar? My use case is after an executable has run, I am writing the stdout...