Skip to content

Commit

Permalink
add WorkDir
Browse files Browse the repository at this point in the history
  • Loading branch information
kokizzu committed Feb 3, 2022
1 parent bc09acd commit 213b06f
Show file tree
Hide file tree
Showing 4 changed files with 512 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ daemon := goproc.New()

cmdId := daemon.AddCommand(&goproc.Cmd{
Program: `sleep`, // program to run
WorkDir: `/tmp`, // directory to run the program (optional)
Parameters: []string{`2`}, // command line arguments
MaxRestart: goproc.RestartForever, // default: NoRestart=0
OnStderr: func(cmd *goproc.Cmd, line string) error { // optional
Expand Down
15 changes: 13 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
module github.com/kokizzu/goproc

go 1.16
go 1.17

require github.com/kokizzu/gotro v1.410.2358
require github.com/kokizzu/gotro v1.1327.2136

require (
github.com/fatih/color v1.13.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
)
Loading

0 comments on commit 213b06f

Please sign in to comment.