process icon indicating copy to clipboard operation
process copied to clipboard

amphp/process 1.x on Windows: Trying to start a non-existent executable gets stuck forever

Open MatmaRex opened this issue 1 year ago • 2 comments

Hi, I couldn't find information anywhere whether the 1.x branch is still maintained. If it isn't, my apologies for bothering you.

I found that trying to start a non-existent executable using amphp/process 1.x gets stuck forever on Windows. Minimal example:

<?php

require "vendor/autoload.php";

use Amp\Process\Process;
use function Amp\Promise\wait;

$process = new Process("asdfasdf");
$pid = wait($process->start());

This seems to be a very similar problem to #51, and the patch proposed there (https://github.com/Nicodinus/amphp-process/commit/3d41ea5cf00b8cc5331b0fcf7bd27878cc72063a) fixes it for me.

MatmaRex avatar Feb 21 '24 23:02 MatmaRex

(I ran into this problem while working on https://github.com/phpactor/phpactor/issues/2551.)

MatmaRex avatar Feb 21 '24 23:02 MatmaRex

I've noticed that you just released 1.1.5, so I take it that it's maintained. I hope you don't mind if I send a pull request, then.

MatmaRex avatar Feb 27 '24 02:02 MatmaRex