In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/a1c993639224dffaa6c41b1639df7eac4e8134fc?hp=38da2237eba18b80fb53f656ed0741131eae32a3>

- Log -----------------------------------------------------------------
commit a1c993639224dffaa6c41b1639df7eac4e8134fc
Author: Daniel Dragan <[email protected]>
Date:   Tue May 19 01:23:29 2015 -0400

    dont use a 64 bit constant for a 32 bit value
    
    Perl on MSVC6 doesnt support 64 bit ints (p5p choice not to support it)
    so this macro isn't defined on MSVC6 builds, commit e59642234e hid this
    mistake from non-DEBUGGING builds. The mistake is a copy paste mistake
    from commit eacbb37937 . Miniperl fails at VC6 link time due to UINT64_C
    symboil not being found.
    
    ..\pad.c(165) : warning C4013: 'UINT64_C' undefined; assuming extern
    returning int
    ..\pad.c(165) : warning C4018: '!=' : signed/unsigned mismatch

M       pad.c

commit a68d0dcb5125eb9a5a724f289abc7446dce0b12a
Author: Steve Hay <[email protected]>
Date:   Mon May 18 18:13:33 2015 +0100

    Revert Windows test watchdog() to kill('KILL', ...)
    
    There are suspicions that the process tree kill('-KILL', ...) might be
    nuking too much. It was only done to kill the cmd.exe+perl.exe tree that
    was unexpectedly launched by system(1, $cmd), but by switching to
    system({$perl} 1, $perl, '-e', $prog) we can avoid the intermediate cmd.exe
    and thus revert to normal process kill('KILL', ...) instead to kill the
    perl.exe that is now launched directly.
    
    See http://www.nntp.perl.org/group/perl.perl5.porters/2015/05/msg227859.html

M       t/test.pl
-----------------------------------------------------------------------

Summary of changes:
 pad.c     |  2 +-
 t/test.pl | 33 ++++++++++++++++++++++-----------
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/pad.c b/pad.c
index ad1fc85..f5ce5f5 100644
--- a/pad.c
+++ b/pad.c
@@ -162,7 +162,7 @@ Perl_set_padlist(CV * cv, PADLIST *padlist){
 #  if PTRSIZE == 8
     assert((Size_t)padlist != UINT64_C(0xEFEFEFEFEFEFEFEF));
 #  elif PTRSIZE == 4
-    assert((Size_t)padlist != UINT64_C(0xEFEFEFEF));
+    assert((Size_t)padlist != 0xEFEFEFEF);
 #  else
 #    error unknown pointer size
 #  endif
diff --git a/t/test.pl b/t/test.pl
index 7063506..cda3840 100644
--- a/t/test.pl
+++ b/t/test.pl
@@ -1589,10 +1589,27 @@ sub watchdog ($;$)
                     _diag("Watchdog warning: $_[0]");
                 };
                 my $sig = $is_vms ? 'TERM' : 'KILL';
-                my $cmd = _create_runperl( prog =>  "sleep($timeout);" .
-                                                    "warn qq/# $timeout_msg" . 
'\n/;' .
-                                                    "kill(q/$sig/, 
$pid_to_kill);");
-                $watchdog = system(1, $cmd);
+                my $prog = "sleep($timeout);" .
+                           "warn qq/# $timeout_msg" . '\n/;' .
+                           "kill(q/$sig/, $pid_to_kill);";
+
+                # On Windows use the indirect object plus LIST form to 
guarantee
+                # that perl is launched directly rather than via the shell (see
+                # perlfunc.pod), and ensure that the LIST has multiple elements
+                # since the indirect object plus COMMANDSTRING form seems to
+                # hang (see perl #121283). Don't do this on VMS, which doesn't
+                # support the LIST form at all.
+                if ($is_mswin) {
+                    my $runperl = which_perl();
+                    if ($runperl =~ m/\s/) {
+                        $runperl = qq{"$runperl"};
+                    }
+                    $watchdog = system({ $runperl } 1, $runperl, '-e', $prog);
+                }
+                else {
+                    my $cmd = _create_runperl(prog => $prog);
+                    $watchdog = system(1, $cmd);
+                }
             };
             if ($@ || ($watchdog <= 0)) {
                 _diag('Failed to start watchdog');
@@ -1603,13 +1620,7 @@ sub watchdog ($;$)
 
             # Add END block to parent to terminate and
             #   clean up watchdog process
-            # Win32 watchdog is launched by cmd.exe shell, so use process group
-            # kill, otherwise the watchdog is never killed and harness waits
-            # every time for the timeout, #121395
-            eval( $is_mswin ?
-            "END { local \$! = 0; local \$? = 0;
-                        wait() if kill('-KILL', $watchdog); };"
-            : "END { local \$! = 0; local \$? = 0;
+            eval("END { local \$! = 0; local \$? = 0;
                         wait() if kill('KILL', $watchdog); };");
             return;
         }

--
Perl5 Master Repository

Reply via email to