amphp / process

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

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

Open MatmaRex opened 6 months ago

MatmaRex commented 6 months ago

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 commented 6 months ago

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

MatmaRex commented 6 months ago

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.