From cf20b6bf65bd037193d6e8b1b671c4659897861f Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 5 Dec 2011 15:36:45 -0800 Subject: Fix #2257 pause/resume semantics for stdin This makes it so that the stdin TTY-wrap stream gets ref'ed on .resume() and unref'ed on .pause() The semantics of the names "pause" and "resume" are a bit weird, but the important thing is that this corrects an API change from 0.4 -> 0.6 which made it impossible to read from stdin multiple times, without knowing when it might end up being closed. If no one has it open, this lets the process die naturally. LGTM'd by @ry --- src/handle_wrap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/handle_wrap.h') diff --git a/src/handle_wrap.h b/src/handle_wrap.h index fc6d623ac6..b9cf31e8eb 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -49,6 +49,7 @@ class HandleWrap { static void Initialize(v8::Handle target); static v8::Handle Close(const v8::Arguments& args); static v8::Handle Unref(const v8::Arguments& args); + static v8::Handle Ref(const v8::Arguments& args); protected: HandleWrap(v8::Handle object, uv_handle_t* handle); -- cgit v1.2.3