Date: Sat, 06 Jun 2026 13:15:38 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295893] "procstat binary <pid>" returns 0 despite file not found after replacing binary Message-ID: <bug-295893-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295893 Bug ID: 295893 Summary: "procstat binary <pid>" returns 0 despite file not found after replacing binary Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: ltning-freebsd@anduin.net When using 'procstat binary' to identify whether running code matches the on-disk version, I get the following behaviour: --- $ procstat binary $$ PID COMM OSREL PATH 38822 bash 1500068 /usr/local/bin/bash $ sudo pkg upgrade -qy bash $ procstat binary $$ PID COMM OSREL PATH procstat: sysctl: kern.proc.pathname: 38822: No such file or directory $ echo $? 0 --- I would expect the exit code to be 1, as it would be if the given PID did not exist: --- $ procstat binary 1234 procstat: sysctl(kern.proc): No such process procstat: procstat_getprocs() $ echo $? 1 --- Am I wrong in assuming this can be considered a bug? -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-295893-227>
