Skip to content

Commit f2c536a

Browse files
committed
test: cover gh-116 issue
1 parent 1721e2b commit f2c536a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/AbstractProcessTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,6 +1099,28 @@ function ($output) use (&$stdErr) {
10991099
$loop->run();
11001100
}
11011101

1102+
public function testIssue116()
1103+
{
1104+
if (DIRECTORY_SEPARATOR === '\\') {
1105+
$this->markTestSkipped('Process pipes not supported on Windows');
1106+
}
1107+
1108+
$loop = $this->createLoop();
1109+
$process = new Process('exit 0');
1110+
1111+
$process->start($loop);
1112+
1113+
// through some chain
1114+
$process->stdout->on('close', function () use ($process) {
1115+
$process->close();
1116+
});
1117+
1118+
$process->close();
1119+
$loop->stop();
1120+
1121+
$this->assertFalse($process->isRunning());
1122+
}
1123+
11021124
/**
11031125
* Execute a callback at regular intervals until it returns successfully or
11041126
* a timeout is reached.

0 commit comments

Comments
 (0)