From: Cheng Zhao Date: Sat, 31 Aug 2013 04:13:08 +0000 (+0800) Subject: Use dummy stdin stream on Windows. X-Git-Tag: v0.4.2~1^2~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=30c9cd4318486246e70f5156048674842ba1439c;p=electron.git Use dummy stdin stream on Windows. --- diff --git a/browser/atom/atom.coffee b/browser/atom/atom.coffee index cf86bf1a..bde64a3f 100644 --- a/browser/atom/atom.coffee +++ b/browser/atom/atom.coffee @@ -1,12 +1,18 @@ fs = require 'fs' path = require 'path' -# Redirect node's console to use our own implementations, since node can not -# handle output when running as GUI program. if process.platform is 'win32' + # Redirect node's console to use our own implementations, since node can not + # handle output when running as GUI program. console.log = console.error = console.warn = process.log process.stdout.write = process.stderr.write = process.log + # Always returns EOF for stdin stream. + Readable = require('stream').Readable + stdin = new Readable + stdin.push null + process.__defineGetter__ 'stdin', -> stdin + # Provide default Content API implementations. atom = {}