From faa93043ba4fc22a63107ad23590c90cd552594a Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 24 Jun 2024 17:02:50 +0800 Subject: [PATCH] fix: ghttp forkRestartProcess args bug --- net/ghttp/ghttp_server_admin_process.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ghttp/ghttp_server_admin_process.go b/net/ghttp/ghttp_server_admin_process.go index 7aa12b81f25..3c86878243c 100644 --- a/net/ghttp/ghttp_server_admin_process.go +++ b/net/ghttp/ghttp_server_admin_process.go @@ -121,7 +121,7 @@ func forkReloadProcess(ctx context.Context, newExeFilePath ...string) error { path = newExeFilePath[0] } var ( - p = gproc.NewProcess(path, os.Args, os.Environ()) + p = gproc.NewProcess(path, os.Args[1:], os.Environ()) sfm = getServerFdMap() ) for name, m := range sfm { @@ -168,7 +168,7 @@ func forkRestartProcess(ctx context.Context, newExeFilePath ...string) error { } env := os.Environ() env = append(env, adminActionRestartEnvKey+"=1") - p := gproc.NewProcess(path, os.Args, env) + p := gproc.NewProcess(path, os.Args[1:], env) if _, err := p.Start(ctx); err != nil { glog.Errorf( ctx,