Skip to content

Commit

Permalink
Implement Proc.pid
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Mar 29, 2018
1 parent 23af1f4 commit 0581613
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Proc.pm6
Expand Up @@ -7,6 +7,7 @@ my class Proc {
has IO::Pipe $.err;
has $.exitcode = -1; # distinguish uninitialized from 0 status
has $.signal;
has $.pid;
has @.command;

has Proc::Async $!proc;
Expand Down Expand Up @@ -177,7 +178,7 @@ my class Proc {
$!finished = $!proc.start(:$cwd, :%ENV, scheduler => $PROCESS::SCHEDULER);
my $is-spawned := do {
CATCH { default { self!set-status(0x100) } }
await $!proc.ready;
$!pid = await $!proc.ready;
True
} // False;
.() for @!post-spawn;
Expand Down

0 comments on commit 0581613

Please sign in to comment.