Re: ActivePerl 628 + warnings + fork + exec = spurious "Can't exec"?
authorBarrie Slaymaker <barries@slaysys.com>
Wed, 11 Jul 2001 15:11:46 +0000 (11:11 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 12 Jul 2001 00:35:27 +0000 (00:35 +0000)
Message-ID: <20010711151146.G24560@jester.slaysys.com>

p4raw-id: //depot/perl@11282

pp_sys.c
t/lib/warnings/doio
win32/win32.c

index 5be0b2d..0451d5a 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4121,11 +4121,6 @@ PP(pp_exec)
 #endif
     }
 
-#if !defined(HAS_FORK) && defined(USE_ITHREADS) && defined(PERL_IMPLICIT_SYS)
-    if (value >= 0)
-       my_exit(value);
-#endif
-
     SP = ORIGMARK;
     PUSHi(value);
     RETURN;
index 2a357e2..9ba4d31 100644 (file)
@@ -172,6 +172,11 @@ EXPECT
 OPTION regex
 Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+
 ########
+# doio.c [win32_execvp]
+use warnings 'exec' ;
+exec $^X, "-e0" ;
+EXPECT
+########
 # doio.c [Perl_nextargv]
 $^W = 0 ;
 my $filename = "./temp.dir" ;
index 50cf1c4..85068b8 100644 (file)
@@ -3363,7 +3363,7 @@ win32_execvp(const char *cmdname, const char *const *argv)
     /* if this is a pseudo-forked child, we just want to spawn
      * the new program, and return */
     if (w32_pseudo_id)
-       return win32_spawnvp(P_WAIT, cmdname, (char *const *)argv);
+       return my_exit(win32_spawnvp(P_WAIT, cmdname, (char *const *)argv));
 #endif
     return execvp(cmdname, (char *const *)argv);
 }