Skip to content
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{} captures stderr #2564

Closed
p6rt opened this issue Nov 28, 2011 · 10 comments
Closed

qx{} captures stderr #2564

p6rt opened this issue Nov 28, 2011 · 10 comments

Comments

@p6rt
Copy link

p6rt commented Nov 28, 2011

Migrated from rt.perl.org#104794 (status was 'resolved')

Searchable as RT104794$

@p6rt
Copy link
Author

p6rt commented Nov 28, 2011

From lumimies@gmail.com

qx{} captures stderr as well as stdout, which it shouldn't be doing.

In p5​:
$ perl -E 'my $a = qx{echo woot 1>&2 }; say "|||$a|||"'
woot
||||||

In rakudo​:
$ perl6 -e 'my $a = qx{echo woot 1>&2 }; say "|||$a|||"'
|||woot
|||

@p6rt
Copy link
Author

p6rt commented Apr 29, 2012

From @ronaldxs

The program below prints the error output after during​: and it usually
shouldn't.

my $x = qqx[ nonesuch ]; print "before\nduring​: $x\nafter\n";

See also on IRC http://irclog.perlgeek.de/perl6/2012-04-29#i_5514465

@p6rt
Copy link
Author

p6rt commented Apr 29, 2012

From emile38@gmail.com

unsubscribe

On Sun, Apr 29, 2012 at 11​:55 AM, Ron Schmidt
<perl6-bugs-followup@​perl.org>wrote​:

# New Ticket Created by Ron Schmidt
# Please include the string​: [perl #​112680]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=112680 >

The program below prints the error output after during​: and it usually
shouldn't.

my $x = qqx[ nonesuch ]; print "before\nduring​: $x\nafter\n";

See also on IRC http://irclog.perlgeek.de/perl6/2012-04-29#i_5514465

@p6rt
Copy link
Author

p6rt commented Apr 29, 2012

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Oct 7, 2014

From @usev6

Looks like this is still an issue with Rakduo on Parrot and on JVM​:

$ perl6-p -e 'my $a = qx{echo woot 1>&2 }; say "|||$a|||"'
|||woot
|||

$ perl6-j -e 'my $a = qx{echo woot 1>&2 }; say "|||$a|||"'
|||woot
|||

Moar gets it right​:
$ perl6-m -e 'my $a = qx{echo woot 1>&2 }; say "|||$a|||"'
woot
||||||

I don't know how to test this in a portable way. For Unix-like system a test could look like​:

use v6;

use Test;
use lib 't/spec/packages';
use Test​::Util;

plan 1;

is_run 'my $a = qx{echo woot 1>&2}; say "|||$a|||"',
  {
  out => "||||||\n",
  err => "woot\n",
  },
  'qx{} does only capture stdout but not stderr';

@p6rt
Copy link
Author

p6rt commented Oct 7, 2014

@usev6 - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 4, 2015

From @donaldh

JVM backend fixed by Raku/nqp@4602aa52cb

@p6rt
Copy link
Author

p6rt commented Mar 12, 2015

From @usev6

After some tweaking I managed to make my test work on Windows as well. I added the test to S29-os/system.t with commit Raku/roast@0f4b5b6b49

The error was not fixed for Parrot, but since support for Parrot was suspended with Rakudo Star Release 2015.02, I'm closing this ticket as 'resolved'.

I'll add 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.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Mar 12, 2015

From @usev6

After some tweaking I managed to make my test work on Windows as well. I added the test to S29-os/system.t with commit Raku/roast@0f4b5b6b49

The error was not fixed for Parrot, but since support for Parrot was suspended with Rakudo Star Release 2015.02, I'm closing this ticket as 'resolved'.

I'll add 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.

@p6rt
Copy link
Author

p6rt commented Mar 12, 2015

@usev6 - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant