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 sch...@pobox.com 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 <31832.969261130@chthon>
hopefully this will reproduce the behavior you're seeing.
~jerry
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 2>&1 "; print STDERR $? >> 8'
0
It must be reopening STDERR and STDOUT.
--
Michael G Schwern sch...@pobox.com 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!
> 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