Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Process][Tests] Prove process fail #5575
Bug fix: no
I am not sure this is an issue, but the following code does not work :
$process = new Process("echo -n 1 ; echo -n 1"); $process->run(); var_dump('11' == $process->getOutput()); // false, var_dump($process->getOutput()) // 1
I don't know why.
tests are run on php 5.4.7 and ubuntu 11.04
This is actually normal because
There's a workaround for your problem :
$process = new Process("bash -c 'echo -n 1 ; echo -n 1'"); $process->run(); var_dump('11' == $process->getOutput()); // true,
I added more tests case , and it always fail.
I found this bug in Sismo repo https://github.com/fabpot/Sismo/blob/master/tests/Sismo/Tests/GithubProjectTest.php#L51 : When I lunch the test suite, Sismo tests fails because
Note: 86d9dea is tested on debian 6 and php 5.3.15
Ok, the change appeared because we now preprend commands with
This change is quite important and necessary because it allows us to get the exact Pid of the process, signal it and have more control over it.
If we remove it , the process will be wrapped by a
I do think we have to mention it in the doc and docblocks, I'll work on it
@romainneutron drop many features ? It will not drop features comparing to the state in 2.0 but reintroduce the BC.