Skip to content

Conversation

@clue
Copy link
Member

@clue clue commented Mar 12, 2017

Currently, reading from a pipe stream (such as STDIN) causes SEGFAULTs on legacy PHP < 5.4.

I've added a very simple cat.php example which highlights this issue.

This patch avoids switching to unbuffered mode for pipe streams on PHP < 5.4 and thus avoids this issue on all versions. Technically, unbuffered reads aren't really needed here for any PHP version, but not using unbuffered reads shows a 10%-20% performance penalty.

Fixes #78

@clue clue added the bug label Mar 12, 2017
@clue clue added this to the v0.6.0 milestone Mar 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants