Skip to content

Commit

Permalink
修复#705
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Mar 21, 2024
1 parent ab56e6f commit 33ea6a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func callStartup() error {
if err != nil {
return err
}
if pproc == nil {
return nil
}
executor := filepath.Base(pproc.Executable())
expected := []string{filepath.Base(os.Args[0]), `startup`, `go`}
var ext string
Expand Down
3 changes: 3 additions & 0 deletions tool/startup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func underMainProcess() bool {
logger.Debug(`ps.FindProcess: `, err)
return false
}
if proc == nil {
return false
}
name := filepath.Base(proc.Executable())
matched := MAIN_EXE == name
if matched {
Expand Down

0 comments on commit 33ea6a2

Please sign in to comment.