Accepted patch from Mark Hindley which avoids clearing realpath information
in pidof when trying to find matching executables.
This commit is contained in:
@@ -740,8 +740,8 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
return NULL;
|
||||
|
||||
/* Try to stat the executable. */
|
||||
memset(real_path, 0, sizeof(real_path));
|
||||
if ( (prog[0] == '/') && ( realpath(prog, real_path) ) ) {
|
||||
memset(&real_path[0], 0, sizeof(real_path));
|
||||
dostat++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user