We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a84b2a commit 2acafcfCopy full SHA for 2acafcf
src/Runner/ShutdownHandler.php
@@ -10,6 +10,7 @@
10
namespace PHPUnit\Runner;
11
12
use const PHP_EOL;
13
+use function getmypid;
14
use function register_shutdown_function;
15
use function rtrim;
16
@@ -42,13 +43,14 @@ private static function register(): void
42
43
}
44
45
self::$registered = true;
46
+ $pid = getmypid();
47
48
register_shutdown_function(
- static function (): void
49
+ static function () use ($pid): void
50
{
51
$message = rtrim(self::$message);
52
- if ($message === '') {
53
+ if ($message === '' || $pid !== getmypid()) {
54
return;
55
56
0 commit comments