Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Process] Fix pipes handling#18066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedMar 8, 2016
| Q | A |
|---|---|
| Branch | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #18015 |
| License | MIT |
| Doc PR | - |
nicolas-grekas commentedMar 8, 2016
Status: needs work |
cdf46af todc1e6b1Comparenicolas-grekas commentedMar 9, 2016
GREEN! |
| if (is_resource($input)) { | ||
| $this->input =$input; | ||
| }elseif (is_string($input)) { | ||
| $this->inputBuffer =$input; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If the string already fits in memory, there is no gain in putting it in aphp://temp stream
| } | ||
| // Remove extra null chars returned by fread | ||
| if ('' !==$data) { | ||
| $read[$type] =rtrim($data,"\x00"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@romainneutron I can't reproduce trailing nul chars so I removed this. Can you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This may happen e.g. if you decrypt a string usingmcrypt_decrypt.
xabbuh commentedMar 10, 2016
Amazing work@nicolas-grekas. I almost got mad when trying to fix this build failure. The change itself looks good but I am not too familiar with how the different systems handle processes. |
| $w =array($this->pipes[0]); | ||
| // let's have a look if something changed in streams | ||
| if (false ===$n = @stream_select($r,$w,$e,0,0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
no need to wait here as this is done in readAndWrite
fabpot commentedMar 10, 2016
Thank you@nicolas-grekas. |
This PR was merged into the 2.7 branch.Discussion----------[Process] Fix pipes handling| Q | A| ------------- | ---| Branch | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#18015| License | MIT| Doc PR | -Commits-------3ab6c39 [Process] Fix pipes handling