Hi, [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false"; say $p.exitcode;' 1 [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false", :out; say $p.exitcode;' 0 [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false", :out; print $p.out.slurp-rest; say $p.exitcode;' 0 [roam@straylight ~]$
So, uhm, what am I missing? Shouldn't $p.exitcode remain 1 no matter whether I've invoked run() with or without :out? Should I file a bug? It doesn't matter whether the program actually produces any output on the standard output stream: [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "sh", "-c", "env LANG=C date; exit 3"; say $p.exitcode;' Wed Feb 3 01:34:50 EET 2016 3 [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "sh", "-c", "env LANG=C date; exit 3", :out; say "<<<" ~ $p.out.slurp-rest ~ ">>>"; say $p.exitcode;' <<<Wed Feb 3 01:35:35 EET 2016 >>> 0 [roam@straylight ~]$ This happens absolutely reproducibly on all of the following: This is Rakudo version 2015.12 built on MoarVM version 2015.12 implementing Perl 6.c. This is Rakudo version 2016.01 built on MoarVM version 2016.01 implementing Perl 6.c. This is Rakudo version 2016.01.1 built on MoarVM version 2016.01 implementing Perl 6.c. My system is Debian testing: Linux straylight 4.3.0-1-amd64 #1 SMP Debian 4.3.3-5 (2016-01-04) x86_64 GNU/Linux Thanks in advance for any clarifications, including "what the *bleep*, just read this line of the documentation already!" :) G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@freebsd.org p...@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
signature.asc
Description: PGP signature