Skip to content

Commit

Permalink
Fix deepsource
Browse files Browse the repository at this point in the history
  • Loading branch information
chainhelen committed May 4, 2020
1 parent a0839f3 commit 0dd2cd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/proc/native/proc_linux.go
Expand Up @@ -164,7 +164,7 @@ func initialize(dbp *nativeProcess) error {
}
comm = match[1]
}
dbp.os.comm = strings.Replace(string(comm), "%", "%%", -1)
dbp.os.comm = strings.ReplaceAll(string(comm), "%", "%%")
return nil
}

Expand Down Expand Up @@ -364,8 +364,7 @@ func (dbp *nativeProcess) trapWaitInternal(pid int, options trapWaitOptions) (*n
th.os.delayedSignal = int(status.StopSignal())
th.os.running = false
return th, nil
} else {
if err := th.resumeWithSig(int(status.StopSignal())); err != nil {
} else if err := th.resumeWithSig(int(status.StopSignal())); err != nil {
if err == sys.ESRCH {
dbp.postExit()
return nil, proc.ErrProcessExited{Pid: dbp.pid}
Expand Down

0 comments on commit 0dd2cd8

Please sign in to comment.