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

External process return values affecting react blocks #5146

Open
p6rt opened this issue Feb 21, 2016 · 3 comments
Open

External process return values affecting react blocks #5146

p6rt opened this issue Feb 21, 2016 · 3 comments
Labels
osx

Comments

@p6rt
Copy link

@p6rt p6rt commented Feb 21, 2016

Migrated from rt.perl.org#127587 (status was 'open')

Searchable as RT127587$

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 21, 2016

From john.haltiwanger@gmail.com

I discovered this behavior while using IO.watch, but it is also
demonstrable with a simple interval supply.

It occurs with both Proc​::Async and qq​:x. I've included both for easy
testing. The 'echo' never actually runs. I only get 'interval 1' and then
the script returns.

# Proc​::Async

sub MAIN {
  react {
  whenever Supply.interval(1) {
  start {
  my $phrase = "interval {++$}" .say;
  my $cmd = Proc​::Async.new​: 'echo', "echo​: $phrase";
  $cmd.stdout.tap​: *.say;
  await $cmd.start;
  }
  }
  }
}

## qq​:x

sub MAIN {
  react {
  whenever Supply.interval(1) {
  start {
  my $phrase = "interval {++$}" .say;
  qq​:x[ echo "echo​: $phrase" ];
  }
  }
  }
}

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 23, 2016

From @LLFourn

https://rt.perl.org/Public/Bug/Display.html?id=126277
https://rt.perl.org/Public/Bug/Display.html?id=125516
https://rt.perl.org/Public/Bug/Display.html?id=125758

Just a few other OS X problems for reference.

On Tue, Feb 23, 2016 at 3​:41 AM ab5tract <perl6-bugs-followup@​perl.org>
wrote​:

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

I discovered this behavior while using IO.watch, but it is also
demonstrable with a simple interval supply.

It occurs with both Proc​::Async and qq​:x. I've included both for easy
testing. The 'echo' never actually runs. I only get 'interval 1' and then
the script returns.

# Proc​::Async

sub MAIN {
react {
whenever Supply.interval(1) {
start {
my $phrase = "interval {++$}" .say;
my $cmd = Proc​::Async.new​: 'echo', "echo​: $phrase";
$cmd.stdout.tap​: *.say;
await $cmd.start;
}
}
}
}

## qq​:x

sub MAIN {
react {
whenever Supply.interval(1) {
start {
my $phrase = "interval {++$}" .say;
qq​:x[ echo "echo​: $phrase" ];
}
}
}
}

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 23, 2016

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

@p6rt p6rt added the osx label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.