in reply to Re^4: win32 open3 strangeness (classic race, no fork)
in thread win32 open3 strangeness
I have buffering turned off and when I run that snippet I get:my( $write, $read, $error, $pid ); if( $is_win32 ) { print "here2\n"; open my $file, "<", $_ or warn "Can't open $_ for read +ing"; #log chomp( my $shebang = <$file> ); close $file; warn "Bad shebang: $shebang - $_" unless $shebang =~ s +/^\#!//; #log #shitty highlighting #warn "$shebang $_"; #log print "here 3\n"; print "$shebang $_",$/; eval{ $pid = open3( $write, $read, $error, $shebang, $ +_ ) }; print "here 4\n"; }
Where "perl usr/test.pl" is the $shebang $_ line. usr/test.pl looks like:here2 here 3 perl usr/test.pl
If I change the 489 to 488, everything works perfectly. However, this is run from a forked subprocess, which is apparently causing the error, as when I run that open3 line from the command line via perl -e, it works perfectly, so theres something screwy with multiple forks.#!perl print "x" x 489;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: win32 open3 strangeness (no fork!)
by tye (Sage) on Dec 16, 2004 at 00:59 UTC | |
by BUU (Prior) on Dec 16, 2004 at 02:50 UTC | |
by tye (Sage) on Dec 16, 2004 at 03:02 UTC |