Skip to content

Commit

Permalink
show process full detail information
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteCcinn committed May 28, 2021
1 parent 909e538 commit bc68ae0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,16 @@ func Background(ctx context.Context, dctx *Context, opts ...Option) (*exec.Cmd,

// startProc start am process
func startProc(ctx context.Context, dctx *Context) (*exec.Cmd, error) {
// console show process information just use Args[0]
// so we should wrapper the args for show process full command
execs := strings.Split(dctx.Args[0], " ")
cmd := &exec.Cmd{
Path: dctx.Args[0],
Args: dctx.Args,
Path: execs[0],
Args: []string{strings.Join(dctx.Args, " ")},
Env: dctx.Env,
SysProcAttr: &dctx.ProcAttr,
}

dctx.Cmd = cmd

if dctx.Logger != nil {
Expand Down

0 comments on commit bc68ae0

Please sign in to comment.