Re: [perl #36677] Parrot cannot startup if STDERR or STDOUT is closed
On Thu, Jul 28, 2005 at 12:31:33PM -0700, jerry gay via RT wrote: i've added a new test t/run/exit.t that checks parrot exit codes under different scenarios. the 8 subtests all pass on win32. These tests pass, and yet: $ perl -wle 'close STDOUT; system parrot --version; print STDERR $? 8' Parrot IO: Failed init layer(unix). 66 It appears to be your redirect which is doing it. $ perl -wle 'close STDOUT; system parrot --version /dev/null 21 ; print STDERR $? 8' 0 It must be reopening STDERR and STDOUT. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Ahh email, my old friend. Do you know that revenge is a dish that is best served cold? And it is very cold on the Internet!
Re: [perl #36677] Parrot cannot startup if STDERR or STDOUT is closed
Michael G Schwern (via RT) wrote: Parrot cannot start up if either STDOUT or STDERR are closed. Fixed in trunk - r8730 Now a Undef PMC is stored as the PIO STDxx PMC. This will give nice effects if you print something. leo
Re: [perl #36677] Parrot cannot startup if STDERR or STDOUT is closed
i've added a new test t/run/exit.t that checks parrot exit codes under different scenarios. the 8 subtests all pass on win32. hopefully this will reproduce the behavior you're seeing. ~jerry On 7/27/05, via RT Michael G Schwern [EMAIL PROTECTED] wrote: # New Ticket Created by Michael G Schwern # Please include the string: [perl #36677] # in the subject line of all future correspondence about this issue. # URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36677 Parrot cannot start up if either STDOUT or STDERR are closed. In both cases it exits with 65. This problem was noticed because ponie (which uses Parrot) would not start up if STDERR was closed. $ perl -wle 'close STDERR; system(parrot --version); print $? 8' 65 $ perl -wle 'close STDOUT; system(parrot --version); print STDERR $? 8' Parrot IO: Failed init layer(unix). 65 $ perl -wle 'system(parrot --version); print $? 8' This is parrot version 0.1.2-devel built for ppc-darwin. Copyright (C) 2001-2005 The Perl Foundation. All Rights Reserved. Parrot may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Parrot source kit. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. PASM/PIR compiler version 0.1.2. 0 -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it. -- tchrist in [EMAIL PROTECTED]