From: Barrie Slaymaker Date: Wed, 11 Jul 2001 15:11:46 +0000 (-0400) Subject: Re: ActivePerl 628 + warnings + fork + exec = spurious "Can't exec"? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0698c26b0962200032e136c010a6eead072d5cf4;p=p5sagit%2Fp5-mst-13.2.git Re: ActivePerl 628 + warnings + fork + exec = spurious "Can't exec"? Message-ID: <20010711151146.G24560@jester.slaysys.com> p4raw-id: //depot/perl@11282 --- diff --git a/pp_sys.c b/pp_sys.c index 5be0b2d..0451d5a 100644 --- 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; diff --git a/t/lib/warnings/doio b/t/lib/warnings/doio index 2a357e2..9ba4d31 100644 --- a/t/lib/warnings/doio +++ b/t/lib/warnings/doio @@ -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" ; diff --git a/win32/win32.c b/win32/win32.c index 50cf1c4..85068b8 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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); }