New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qx// and run() do not respect %*ENV change in rakudo-parrot #3276
Comments
From dram.wang@gmail.comIn rakudo-parrot 2013.10, both qx// and run() do not respect %*ENV change. shell() has no problem, also there is no problem in rakudo-jvm.
|
From @FROGGSHi, shell() is supposed to spawn a shell as the name suggests (`sh` on linuxes, `cmd.exe` on windows). Examples: perl6-p -e '%*ENV<ENV_TEST>="foo"; run("env")' This however seems to be a valid bug: |
The RT System itself - Status changed from 'new' to 'open' |
From dram.wang@gmail.comOn Wed Nov 13 09:53:15 2013, FROGGS.de wrote:
Yes, I'm aware of that, but I think in both case (spawn and non-spawn), environment vars need to be passed into subprocesses.
Curious that my results are different when running those two lines: $ perl6 -e '%*ENV<ENV_TEST>="foo"; run("sh", "-c", "echo \$ENV_TEST")' $ perl6 -e '%*ENV<ENV_TEST>="foo"; run("env")' | grep ENV_TEST I tested them in bash and mksh under linux, not sure if it is relevant.
|
From dram.wang@gmail.com2013/11/14 Tobias Leich via RT <perl6-bugs-followup@perl.org>
Yes, I'm aware of that, but I think in both case (spawn and non-spawn),
Curious that my results are different when running those two lines: $ perl6 -e '%*ENV<ENV_TEST>="foo"; run("sh", "-c", "echo \$ENV_TEST")' $ perl6 -e '%*ENV<ENV_TEST>="foo"; run("env")' | grep ENV_TEST I tested them in bash and mksh under linux, not sure if it is relevant.
|
From @FROGGSYou would need a rakudo that is not more than two weeks old I think. And yes, all variants should pass the environment vars along, I just wanted to mention that you need to be careful when using shell patterns. Since `echo $ENV_TEST` will only work using a shell, ever. Fixing qx// means fixing sub QX, which opens a pipe and captures STDOUT that way... |
From dram.wang@gmail.comOn Fri Nov 15 06:52:58 2013, FROGGS.de wrote:
Works on master branch, great!
Get it. :)
Ok, no hurry. |
From @usev6This works fine with Moar and JVM, but is still an issue with Parrot: $ perl6-m -e '%*ENV<ENV_TEST>="foo"; say qx/env/ ~~ /ENV_TEST/' ## same result with perl6-j $ perl6-p -e '%*ENV<ENV_TEST>="foo"; say qx/env/ ~~ /ENV_TEST/' I added a test (fudged 'todo' for Parrot) to S02-literals/quoting.t with the following commit: Raku/roast@a3b0edce25 |
1 similar comment
From @usev6This works fine with Moar and JVM, but is still an issue with Parrot: $ perl6-m -e '%*ENV<ENV_TEST>="foo"; say qx/env/ ~~ /ENV_TEST/' ## same result with perl6-j $ perl6-p -e '%*ENV<ENV_TEST>="foo"; say qx/env/ ~~ /ENV_TEST/' I added a test (fudged 'todo' for Parrot) to S02-literals/quoting.t with the following commit: Raku/roast@a3b0edce25 |
From @usev6Since support for Parrot was suspended with Rakudo Star Release 2015.02, I'm closing this "parrot only" ticket. I added the ticket to a list of closed ticket living in the Mu repository: https://github.com/perl6/mu/blob/master/misc/rt.perl.org/tickets_closed_parrot_only.txt. In case support for Parrot will be restored in some future release the listed tickets can be checked and re-opened as appropriate. |
@usev6 - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#120529 (status was 'rejected')
Searchable as RT120529$
The text was updated successfully, but these errors were encountered: