On Wed, 2006-12-13 at 17:15 +0100, Mark Martinec wrote:
>
> $ perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
> $ PERLIO='' perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
> $ PERLIO='stdio' perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
> $ PERLIO='perlio' perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
> $ unset PERLIO; perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
>
> Then try:
> $ echo "test"|PERLIO="stdio" perl -e '$!=0; while(<>){print}; $!==0 or die
> "Err: $!"'
> $ echo "test"|PERLIO="perlio" perl -e '$!=0; while(<>){print}; $!==0 or die
> "Err: $!"'
> etc.
>
Mark-
Thanks for the pointers:
mail:~# perl -le 'print join(", ",PerlIO::get_layers(\*STDIN))'
unix, perlio
mail:~# PERLIO='' perl -le 'print join(",
",PerlIO::get_layers(\*STDIN))'
unix, perlio
mail:~# PERLIO='stdio' perl -le 'print join(",
",PerlIO::get_layers(\*STDIN))'
stdio
mail:~# PERLIO='perlio' perl -le 'print join(",
",PerlIO::get_layers(\*STDIN))'
unix, perlio
mail:~# unset PERLIO; perl -le 'print join(",
",PerlIO::get_layers(\*STDIN))'
unix, perlio
mail:~# echo "test"|PERLIO="stdio" perl -e '$!=0; while(<>){print}; $!
==0 or die "Err: $!"'
test
Err: Bad file descriptor at -e line 1, <> line 1.
mail:~# echo "test"|PERLIO="perlio" perl -e '$!=0; while(<>){print}; $!
==0 or die "Err: $!"'
test
mail:~# echo "test"|PERLIO="unix" perl -e '$!=0; while(<>){print}; $!
==0 or die "Err: $!"'
test
mail:~# echo "test"|PERLIO="" perl -e '$!=0; while(<>){print}; $!==0 or
die "Err: $!"'
test
mail:~#
Here is the amavis error I get:
Dec 12 18:52:54 mail amavisd-new[10954]: (08229-10) run_command: child
process [10954] faled to
exec /usr/bin/file
/var/lib/amavis/amavis-20061212T185254-08229/parts/part-00001: an't close
main::stdin: Bad file descriptor at /usr/sbin/amavisd-new line 1131, <GEN56>
lne 1353.
Thanks,
Z
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/