Skip to content

Commit dff0749

Browse files
committed
Use untruncated ps output for unix pid detection
1 parent 24d7da6 commit dff0749

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/roborev/processcheck_unix.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ func identifyPIDForUpdate(pid int) updatePIDIdentity {
4949
return updatePIDNotRoborev
5050
}
5151

52-
cmd := exec.Command("ps", "-p", strconv.Itoa(pid), "-o", "command=")
52+
// Use -ww to request untruncated command output on BSD/macOS ps.
53+
cmd := exec.Command("ps", "-ww", "-p", strconv.Itoa(pid), "-o", "command=")
5354
output, err := cmd.Output()
5455
if err != nil {
5556
return updatePIDUnknown

0 commit comments

Comments
 (0)