killall and pgrep updates.

Set --ns $$ on commands.
This commit is contained in:
SimonFair
2024-10-10 19:18:54 +01:00
parent 3c007fa1d0
commit 80d567dfde
25 changed files with 38 additions and 38 deletions
+2 -2
View File
@@ -263,7 +263,7 @@ function urlencode_path($path) {
return str_replace("%2F", "/", urlencode($path));
}
function pgrep($process_name, $escape_arg=true) {
$pid = exec("pgrep ".($escape_arg?escapeshellarg($process_name):$process_name), $output, $retval);
$pid = exec('pgrep --ns $$ '.($escape_arg?escapeshellarg($process_name):$process_name), $output, $retval);
return $retval==0 ? $pid : false;
}
function is_block($path) {
@@ -372,7 +372,7 @@ function my_rmdir($dirname) {
'dataset' => $zfsdataset,
'type' => $fstype,
'cmd' => $cmdstr,
'error' => $error,
'error' =>
];
break;
case "btrfs":