Skip to content

Commit

Permalink
Merge pull request #30 from woytam/patch-1
Browse files Browse the repository at this point in the history
Support for advanced own child from examples
  • Loading branch information
WyriHaximus authored Mar 26, 2019
2 parents 6900574 + 28b3b3b commit 960fcaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public static function parent(
) {
return new Promise\Promise(function ($resolve, $reject) use ($process, $loop, $options) {
$server = new Server('127.0.0.1:0', $loop);
$argvString = \escapeshellarg(ArgvEncoder::encode([
'address' => $server->getAddress(),
]));

$options['random'] = \bin2hex(\random_bytes(32));
$options['address'] = $server->getAddress();
$argvString = \escapeshellarg(ArgvEncoder::encode($options));
$process = new Process($process->getCommand() . ' ' . $argvString);

self::startParent($process, $server, $loop, $options)->done($resolve, $reject);
Expand Down

0 comments on commit 960fcaa

Please sign in to comment.