Re: ponie's copy of Parrot doesn't build on Windows

[email protected] (Benjamin Goldberg)
Newsgroups perl.ponie.dev
Message-ID <[email protected]>

Brent Dax wrote:
> 
> A few days ago, a bug was found in one of Parrot's build-time utilities
> that was causing multiple copies of the C compiler to start up on
> Windows.  (Apparently exec() on Windows has some weird asynchronous
> behavior.)  These multiple compilers would then try to open a file, but
> only one would succeed, causing most of the compilations to fail.
> 
> This was fixed in version 1.4 of tools/dev/cc_flags.pl.  I suggest we
> update Ponie's copy of Parrot to include that version.
> 
> If it helps, I've pasted a diff below my sig that will do the same
> thing.  I don't know if applying it is the right thing to do,
> though--there may be some trick with CVS that would be better.
> 
> --Brent Dax <[email protected]>
> Perl and Parrot hacker
> 
> "Yeah, and my underwear is flame-retardant--that doesn't mean I'm gonna
> set myself on fire to prove it."
> 
> --- parrot\tools\dev\cc_flags.pl        (revision 12)
> +++ parrot\tools\dev\cc_flags.pl        (working copy)
> @@ -67,4 +67,4 @@
>  }
> 
>  print "@ARGV\n";
> -exec @ARGV;
> +exit system(@ARGV)/256;

Considering that the parent process *might* want to know if the command
died from signals, as well as maybe from exit()ing, perhaps it should be
something like:

   exec @ARGV unless $^O eq "MSWin32";
   my $n = system(@ARGV);
   die "Error calling system(@ARGV): $!" if $n == -1;
   kill $n & 255, $$ if $n & 255;
   exit $n/256;
   __END__

-- 
$a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca
);{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "$@[$a%6
]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.