PR/52799: Martin Husemann: Correct sysctl args to find executable.

This commit is contained in:
christos 2017-12-10 05:36:25 +00:00
parent 57f560bc12
commit dd3d2dc091

View File

@ -50,9 +50,9 @@ nbsd_pid_to_exec_file (struct target_ops *self, int pid)
int mib[4];
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PATHNAME;
mib[3] = pid;
mib[1] = KERN_PROC_ARGS;
mib[2] = pid;
mib[3] = KERN_PROC_PATHNAME;
buflen = sizeof buf;
if (sysctl (mib, 4, buf, &buflen, NULL, 0) == 0)
return buf;