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

Cand't catch Proc::Async-run program exiting with non-zero status #5467

Closed
p6rt opened this issue Jul 19, 2016 · 4 comments
Closed

Cand't catch Proc::Async-run program exiting with non-zero status #5467

p6rt opened this issue Jul 19, 2016 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Jul 19, 2016

Migrated from rt.perl.org#128674 (status was 'rejected')

Searchable as RT128674$

@p6rt
Copy link
Author

p6rt commented Jul 19, 2016

From @zoffixznet

zoffix@​VirtualBox​:~$ cat ~/bin/streams.p6
#!/usr/bin/env perl6

my $p = Proc​::Async.new​: 'perl6', '-e', 'exit 255';
try await $p.start;
say 'still here';

zoffix@​VirtualBox​:~$ streams.p6
The spawned process exited unsuccessfully (exit code​: 255)
  in block <unit> at /home/zoffix/bin/streams.p6 line 4

zoffix@​VirtualBox​:~$

--
Cheers,
ZZ | https://twitter.com/zoffix

@p6rt
Copy link
Author

p6rt commented Jul 20, 2016

From @zoffixznet

A bit of conversation on the topic here​: http://irclog.perlgeek.de/perl6/2016-07-20#i_12870811

@p6rt
Copy link
Author

p6rt commented Jul 20, 2016

From @zoffixznet

Not a bug after all​: the result of the returned promise is a Proc which passes the try check but then gets sunk and a Proc.sink() throws if the process run is unsuccessful.

@p6rt
Copy link
Author

p6rt commented Jul 20, 2016

@zoffixznet - Status changed from 'new' to 'rejected'

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