Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support spawning child process on Windows without process I/O pipes #67

Merged
merged 2 commits into from
Jan 11, 2019

Conversation

clue
Copy link
Member

@clue clue commented Jan 10, 2019

This PR adds limited Windows support by omitting any process I/O pipes on Windows. While this means that portability might be limited, it at least allows spawning processes on Windows. Also, this PR includes plenty of tests and documentation for known workarounds, so one can in fact process output using I/O redirections. This has been tested extensively on some Windows 10 installations, but this repository does not currently run any tests on Windows. I consider this to be out of scope for this ticket, but agree that it makes sense to look into test automation in a follow-up PR. In the meantime, you're invited to run this on your local Windows installation or take my word for granted, so now let's get this shipped! :shipit: ❤️

Resolves / closes #9
Builds on top of #65

@clue clue added this to the v0.6.0 milestone Jan 10, 2019
@WyriHaximus
Copy link
Member

party hard

src/Process.php Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/Process.php Outdated Show resolved Hide resolved
@clue
Copy link
Member Author

clue commented Jan 11, 2019

Updated to address the above remarks. Thanks for the review!

@WyriHaximus
Copy link
Member

LGTM 🚢 🇮🇹 !

@ghost
Copy link

ghost commented Jan 11, 2019

Sidenote: I/O pipes could be supported if PHP would implement support for named pipes (as opposed to anonymous pipes). If that support is expressed through being able to create and remove named pipes in userland or through some sort of internal creation of named pipes with a random name instead of anonymous pipes, is open.

@clue
Copy link
Member Author

clue commented Jan 11, 2019

@CharlotteDunois I agree and I'm looking forward to see more alternatives in PHP userspace in the future! 👍 Some of those options have been discussed in #9 already, so for example we might also be able to set SO_OPENTYPE to SO_SYNCHRONOUS_NONALERT on Windows or other workarounds. I consider this PR to be a starting point and I would love to see more people contribute possible workarounds in the future! :shipit:

@jsor jsor merged commit 6ad670c into reactphp:master Jan 11, 2019
@ghost
Copy link

ghost commented Jan 11, 2019

🎉

@clue clue deleted the windows branch January 11, 2019 18:02
@WyriHaximus
Copy link
Member

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows compatibility?
3 participants