Hi,

I don't understand this, and I wonder could shed some light on the situation?

I have the following experimental program:

use v6;
my $proc = Proc::Async.new($*EXECUTABLE, "-e", "sleep 20000; say 'done'");
$proc.stdout.tap: -> $s { print $s };
my $promise = $proc.start;
await $promise;

If I run this in one terminal and run "ps axuw" in another terminal I
see 2 processes running.
If I press Ctrl-C in the terminal where I launched the program, both
processes are closed.

OTOH If I run "kill PID" with the process ID of the parent process
then only that process is killed. The child process is still waiting
for the prompt.

It does not make any difference if I use kill PID, or kill -2 PID or
kill -3 PID.

I'd understand that "kill PID" leaves the child process but then why
does Ctrl-C kill both? And then how comes "kill -2 PID", which as I
understand must be the same SIGINT as the Ctrl-C, only kills the
parent?


This is Rakudo version 2017.04.3 built on MoarVM version 2017.04-53-g66c6dda
running on OSX.

regards
    Gabor

Reply via email to