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

Correctly redirect output to console on Windows #5776

Merged
merged 2 commits into from May 31, 2016

Conversation

Projects
None yet
2 participants
@zcbenz
Contributor

zcbenz commented May 31, 2016

Since the upgrade to VS 2015, the implementation of stdio seems to have changed. This PR fixes routing stdio to Console by using base::RouteStdioToConsole.

However it is impossible to make stdin work, we have to attach to parent Console, but because Electron is a GUI program, Windows is not willing to pipe stdin to us. One workaround is to alloc a new Console window for Electron, which would cause troubles since it makes every Electron process being attached with an extra Console window.

This should be totally fine for all apps though, the only downside is we are not able to run REPL in Electron on Windows.

Close #5713.
Close #5715.

@zcbenz zcbenz merged commit 6c705fd into master May 31, 2016

9 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #3330676 succeeded in 38s
Details
electron-linux-ia32 Build #3330677 succeeded in 32s
Details
electron-linux-x64 Build #3330678 succeeded in 115s
Details
electron-mas-x64 Build #1360 succeeded in 5 min 15 sec
Details
electron-osx-x64 Build #1363 succeeded in 6 min 33 sec
Details
electron-win-ia32 Build #365 succeeded in 6 min 3 sec
Details
electron-win-x64 Build #359 succeeded in 6 min 24 sec
Details

@zcbenz zcbenz deleted the fix-node-output branch May 31, 2016

@bpasero

This comment has been minimized.

Contributor

bpasero commented Jul 1, 2016

@zcbenz Does this change make the ELECTRON_NO_ATTACH_CONSOLE workaround on Windows obsolete? We set it to get output together with ELECTRON_RUN_AS_NODE and now I wonder if we can remove the no-attach if we update to a newer Electron.

@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Jul 1, 2016

@bpasero I'm not sure, ideally the output of node processes should work out of box now.

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