mirror of
https://github.com/curl/curl.git
synced 2026-06-09 23:34:16 +03:00
parent
69b1c544cd
commit
cf59e21807
1 changed files with 0 additions and 8 deletions
|
|
@ -128,15 +128,11 @@ sub pidexists {
|
|||
if($pid > 4194304 && os_is_win()) {
|
||||
$pid -= 4194304;
|
||||
if($^O ne 'MSWin32') {
|
||||
print "\n>>>pidexists|$has_win32_process|\n";
|
||||
if($has_win32_process) {
|
||||
print ">>>pidexists Win32\n";
|
||||
my %processes = Win32::Process::List->new()->GetProcesses();
|
||||
if(exists $processes{$pid}) {
|
||||
print ">>>pidexists Win32 -> YES\n";
|
||||
return -$pid;
|
||||
}
|
||||
print ">>>pidexists Win32 -> NO\n";
|
||||
} else {
|
||||
my $filter = "PID eq $pid";
|
||||
# https://ss64.com/nt/tasklist.html
|
||||
|
|
@ -170,9 +166,7 @@ sub pidterm {
|
|||
if($pid > 4194304 && os_is_win()) {
|
||||
$pid -= 4194304;
|
||||
if($^O ne 'MSWin32') {
|
||||
print "\n>>>pidterm|$has_win32_process|\n";
|
||||
if($has_win32_process) {
|
||||
print "\n>>>pidterm Win32\n";
|
||||
Win32::Process::KillProcess($pid, 0);
|
||||
} else {
|
||||
# https://ss64.com/nt/taskkill.html
|
||||
|
|
@ -201,9 +195,7 @@ sub pidkill {
|
|||
if($pid > 4194304 && os_is_win()) {
|
||||
$pid -= 4194304;
|
||||
if($^O ne 'MSWin32') {
|
||||
print "\n>>>pidkill|$has_win32_process|\n";
|
||||
if($has_win32_process) {
|
||||
print "\n>>>pidkill Win32\n";
|
||||
Win32::Process::KillProcess($pid, 0);
|
||||
} else {
|
||||
# https://ss64.com/nt/taskkill.html
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue