Skip to content

Commit

Permalink
net/ghttp: fix args issue for forkRestartProcess in graceful restar…
Browse files Browse the repository at this point in the history
…ting of ghttp.Server (#3661)
  • Loading branch information
hailaz authored Jun 24, 2024
1 parent 4abb32e commit 7d464d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ghttp/ghttp_server_admin_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7d464d4

Please sign in to comment.