process: resize stderr on SIGWINCH

Fixes: https://github.com/nodejs/io.js/issues/2219
PR-URL: https://github.com/nodejs/io.js/pull/2231
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
pull/2231/head
Jeremiah Senkpiel 2015-07-23 09:15:19 -07:00
parent 66fc8ca22b
commit bf2cd225a8
1 changed files with 5 additions and 0 deletions

View File

@ -637,6 +637,11 @@
er = er || new Error('process.stderr cannot be closed.');
stderr.emit('error', er);
};
if (stderr.isTTY) {
process.on('SIGWINCH', function() {
stderr._refreshSize();
});
}
return stderr;
});