amphp / process

An async process dispatcher for Amp.
MIT License
229 stars 32 forks source link

posix/Runner::kill not worked #29

Closed Ekstazi closed 5 years ago

Ekstazi commented 5 years ago

some example code:

$process = yield Amp\Parallel\Context::run('test.php');
$process->kill();

test.php:

sleep(30);

As i can see on linux systems(ps -aux | grep php) test,php keep runned and detached after end of main script.

This happen because kill only terminate sh but keep php detached.

Ekstazi commented 5 years ago

Php bug described here: http://php.net/manual/ru/function.proc-terminate.php

https://bugs.php.net/bug.php?id=39992,

ostrolucky commented 5 years ago

I'm also affected by this. @kelunik @trowski please take inspiration from symfony/process and have less naive killing logic. Just proc_terminate is not going to cut it.

trowski commented 5 years ago

@ostrolucky I was waiting for @Ekstazi to update the PR to remove the change he made to the travis config… but that didn't happen and I forgot about it. I'll update it myself and merge it.

Ekstazi commented 5 years ago

@trowski Sorry. I didn't find way to fix seg fault yet... Can you help me with it ?