mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:43:32 +03:00
GHA/windows: enable HTTPS tests with stunnel
- install stunnel Closes #14488
This commit is contained in:
parent
4a0061697e
commit
bc72a78a11
3 changed files with 37 additions and 20 deletions
|
|
@ -104,6 +104,22 @@ sub pidfromfile {
|
|||
return $pid;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# return Cygwin pid from virtual pid
|
||||
#
|
||||
sub winpid_to_pid {
|
||||
my $vpid = $_[0];
|
||||
if(($^O eq 'cygwin' || $^O eq 'msys') && $vpid > 65536) {
|
||||
my $pid = Cygwin::winpid_to_pid($vpid - 65536);
|
||||
if($pid) {
|
||||
return $pid;
|
||||
} else {
|
||||
return $vpid
|
||||
}
|
||||
}
|
||||
return $vpid;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# pidexists checks if a process with a given pid exists and is alive.
|
||||
# This will return the positive pid if the process exists and is alive.
|
||||
|
|
@ -115,6 +131,7 @@ sub pidexists {
|
|||
|
||||
if($pid > 0) {
|
||||
# verify if currently existing Windows process
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
|
|
@ -144,6 +161,7 @@ sub pidterm {
|
|||
|
||||
if($pid > 0) {
|
||||
# request the process to quit
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
|
|
@ -169,13 +187,14 @@ sub pidkill {
|
|||
|
||||
if($pid > 0) {
|
||||
# request the process to quit
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
my $filter = "PID eq $pid";
|
||||
my $result = `tasklist -fi \"$filter\" 2>nul`;
|
||||
if(index($result, "$pid") != -1) {
|
||||
system("taskkill -f -fi \"$filter\" >nul 2>&1");
|
||||
system("taskkill -f -t -fi \"$filter\" >nul 2>&1");
|
||||
# Windows XP Home compatibility
|
||||
system("tskill $pid >nul 2>&1");
|
||||
}
|
||||
|
|
@ -195,6 +214,7 @@ sub pidwait {
|
|||
my $pid = $_[0];
|
||||
my $flags = $_[1];
|
||||
|
||||
$pid = winpid_to_pid($pid);
|
||||
# check if the process exists
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
if($flags == &WNOHANG) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue