diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 02dd11c81ba0..3c7d6b2e7034 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -38,7 +38,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { #else settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; #endif // defined(DEBUG) -#endif // defined(OS_WIN) +#else // defined(OS_WIN) + settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG; +#endif // !defined(OS_WIN) logging::InitLogging(settings); // Logging with pid and timestamp. diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index 5ec2bb05e906..94174c38b743 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -133,3 +133,11 @@ describe 'node feature', -> b = new Buffer(p.innerText) assert.equal b.toString(), 'Jøhänñéß' assert.equal Buffer.byteLength(p.innerText), 13 + + describe 'process.stdout', -> + it 'should not throw exception', -> + process.stdout + + # Not reliable on some machines + xit 'should have isTTY defined', -> + assert.equal typeof(process.stdout.isTTY), 'boolean' diff --git a/spec/static/main.js b/spec/static/main.js index d8b53167c5e2..1f6f9325e490 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -10,6 +10,11 @@ process.port = 0; // will be used by crash-reporter spec. app.commandLine.appendSwitch('js-flags', '--expose_gc'); app.commandLine.appendSwitch('ignore-certificate-errors'); +// Accessing stdout in the main process will result in the process.stdout +// throwing UnknownSystemError in renderer process sometimes. This line makes +// sure we can reproduce it in renderer process. +process.stdout; + ipc.on('message', function(event, arg) { event.sender.send('message', arg); }); diff --git a/vendor/node b/vendor/node index c8962e460f3b..9da7dd871c31 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit c8962e460f3bf03d405489a8380a5571730f5f8d +Subproject commit 9da7dd871c313d318bc1447a83ba3c7618bbbc18