Sha256: 1a5c1cb0ebe36f6e69cf5647404ec1eb53734ffae8d5aed943b9e5cdb5e16814

Contents?: true

Size: 924 Bytes

Versions: 6

Compression:

Stored size: 924 Bytes

Contents

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Process\Tests;

use Symfony\Component\Process\Exception\ProcessTimedOutException;
use Symfony\Component\Process\Process;

require \dirname(__DIR__).'/vendor/autoload.php';

list('e' => $php) = getopt('e:') + ['e' => 'php'];

try {
    $process = new Process("exec $php -r \"echo 'ready'; trigger_error('error', E_USER_ERROR);\"");
    $process->start();
    $process->setTimeout(0.5);
    while (false === strpos($process->getOutput(), 'ready')) {
        usleep(1000);
    }
    $process->signal(SIGSTOP);
    $process->wait();

    return $process->getExitCode();
} catch (ProcessTimedOutException $t) {
    echo $t->getMessage().PHP_EOL;

    return 1;
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dependabot-composer-0.119.0.beta1 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php
dependabot-composer-0.113.19 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php
dependabot-composer-0.112.1 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php
dependabot-composer-0.111.57 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php
dependabot-composer-0.111.56 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php
dependabot-composer-0.111.52 helpers/vendor/symfony/process/Tests/ErrorProcessInitiator.php