Skip to content

Commit

Permalink
process: fix permanent deoptimizations
Browse files Browse the repository at this point in the history
PR-URL: #12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mscdex authored and evanlucas committed May 2, 2017
1 parent 1e03da6 commit 9821c2f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/internal/process/stdio.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function setupStdio() {

switch (tty_wrap.guessHandleType(fd)) {
case 'TTY':
const tty = require('tty');
var tty = require('tty');
stdin = new tty.ReadStream(fd, {
highWaterMark: 0,
readable: true,
Expand All @@ -48,13 +48,13 @@ function setupStdio() {
break;

case 'FILE':
const fs = require('fs');
var fs = require('fs');
stdin = new fs.ReadStream(null, { fd: fd, autoClose: false });
break;

case 'PIPE':
case 'TCP':
const net = require('net');
var net = require('net');

// It could be that process has been started with an IPC channel
// sitting on fd=0, in such case the pipe for this fd is already
Expand Down Expand Up @@ -139,20 +139,20 @@ function createWritableStdioStream(fd) {

switch (tty_wrap.guessHandleType(fd)) {
case 'TTY':
const tty = require('tty');
var tty = require('tty');
stream = new tty.WriteStream(fd);
stream._type = 'tty';
break;

case 'FILE':
const fs = require('internal/fs');
var fs = require('internal/fs');
stream = new fs.SyncWriteStream(fd, { autoClose: false });
stream._type = 'fs';
break;

case 'PIPE':
case 'TCP':
const net = require('net');
var net = require('net');
stream = new net.Socket({
fd: fd,
readable: false,
Expand Down

0 comments on commit 9821c2f

Please sign in to comment.