From 4b9d84df51f7c1d879e27f651cd84de4cb46e229 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 11 Apr 2017 16:29:39 -0600 Subject: tty_wrap: throw when uv_tty_init() returns error Also add checks in lib/tty.js and tests. PR-URL: https://github.com/nodejs/node/pull/12892 Ref: https://github.com/nodejs/node/pull/11883 Ref: https://github.com/nodejs/node/pull/8531 Reviewed-By: Andreas Madsen Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Matteo Collina Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel --- src/tty_wrap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tty_wrap.h') diff --git a/src/tty_wrap.h b/src/tty_wrap.h index 8eadbf0a9f..7b7cb5ece8 100644 --- a/src/tty_wrap.h +++ b/src/tty_wrap.h @@ -44,7 +44,8 @@ class TTYWrap : public StreamWrap { TTYWrap(Environment* env, v8::Local object, int fd, - bool readable); + bool readable, + int* init_err); static void GuessHandleType(const v8::FunctionCallbackInfo& args); static void IsTTY(const v8::FunctionCallbackInfo& args); -- cgit v1.2.3