# New Ticket Created by Faye
# Please include the string: [perl #126037]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=126037 >
$ perl6 -e 'say ?run("false")'
False
$ perl6 -e 'say ?run("false", :out)'
True
$ perl6 -e 'say ?run("false", :err)'
True
$ perl6 -e 'say ?run("false", :in)'
True
It appears that specifying any kind of standard stream fails to set the exit
code properly ("false" is either a shell built-in or a program otherwise
available on linux that does nothing but give a failing exit code). It appears
to be down at the VM level, so I don't know if the problem exists on both Moar
and JVM. On MoarVM at least, it seems that asking for any of those streams
doesn't set up a pointer to the exit-code variable in the struct used to
execute a new process.
For reference, bash at least still returns the appropriate exit code:
$ false </dev/null >/dev/null 2>/dev/null
$ echo $?
1
$ perl6 -e 'say run("false", :in, :out, :err).exitcode'
0