Skip to content

Commit

Permalink
Merge pull request #21125 from Amrutha-Kanhirathingal/PidTest
Browse files Browse the repository at this point in the history
Replace deprecated wmic with powershell command to getPid
  • Loading branch information
llxia authored Feb 19, 2025
2 parents 0aefb6e + c7910e4 commit 8fd2473
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
open3($in, $out, $err, $javaCmd);
$javaPid = <$out>;
# Command gets the list of PIDs of the Java processes system is running
$perlPid = `wmic process where "name='java.exe'" get ProcessID`;
$perlPid = `powershell -Command "& { Get-Process java | Select-Object -ExpandProperty Id }"`;
print $in "getPid finished";
# String trim both sides of javaPid and perlPid for the index check
$javaPid =~ s/^\s+|\s+$//g;
Expand Down

0 comments on commit 8fd2473

Please sign in to comment.