o Do not warn if the process exits before we get its name.
PR: bin/113777 Submitted by: Dmitrij Tejblum MFC after: 1 week
This commit is contained in:
parent
ff9d7fae6a
commit
48c513e07f
@ -526,6 +526,8 @@ getprocname(pid_t pid)
|
||||
mib[3] = (int)pid;
|
||||
len = sizeof proc;
|
||||
if (sysctl(mib, 4, &proc, &len, NULL, 0) == -1) {
|
||||
/* Do not warn if the process exits before we get its name. */
|
||||
if (errno != ESRCH)
|
||||
warn("sysctl()");
|
||||
return ("??");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user