Skip to content

Commit

Permalink
Ignore processes that may have died
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Dec 30, 2024
1 parent 8be9ad0 commit 5fd706e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions restartable.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func (p *ProcPidFS) GetService(pid1 string, userService bool) string {
func getInfo(pid int, fullPath bool, userService bool) (*Info, error) {
p, err := OpenProcPid(pid)
if err != nil {
if errors.Is(err, unix.ENOENT) {
err = nil
}
return nil, err
}
defer p.Close()
Expand Down

0 comments on commit 5fd706e

Please sign in to comment.