From bc68ae0b2fe0ce20c75cabebc56a2650d96482ff Mon Sep 17 00:00:00 2001 From: whiteCcinn <471113744@qq.com> Date: Fri, 28 May 2021 15:17:29 +0800 Subject: [PATCH] show process full detail information --- daemon.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon.go b/daemon.go index 7e9c36a..a74a0bc 100644 --- a/daemon.go +++ b/daemon.go @@ -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 {