|
|
@ -191,35 +191,6 @@ static Handle<Value> WriteError (const Arguments& args) { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// This exists to prevent process.stdout from keeping the event loop alive.
|
|
|
|
// It is only ever called in src/node.js during the initalization of
|
|
|
|
// process.stdout and will fail if called more than once. We do not want to
|
|
|
|
// expose uv_ref and uv_unref to javascript in general.
|
|
|
|
// This should be removed in the future!
|
|
|
|
static bool unref_called = false; |
|
|
|
static Handle<Value> Unref(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
|
assert(unref_called == false); |
|
|
|
|
|
|
|
uv_unref(uv_default_loop()); |
|
|
|
unref_called = true; |
|
|
|
|
|
|
|
return Null(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Handle<Value> Ref(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
|
assert(unref_called == true); |
|
|
|
|
|
|
|
uv_ref(uv_default_loop()); |
|
|
|
|
|
|
|
return Null(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Handle<Value> OpenStdin(const Arguments& args) { |
|
|
|
HandleScope scope; |
|
|
|
|
|
|
@ -347,9 +318,6 @@ void Stdio::Initialize(v8::Handle<v8::Object> target) { |
|
|
|
NODE_SET_METHOD(target, "isatty", IsATTY); |
|
|
|
NODE_SET_METHOD(target, "openpty", OpenPTY); |
|
|
|
|
|
|
|
NODE_SET_METHOD(target, "unref", Unref); |
|
|
|
NODE_SET_METHOD(target, "ref", Ref); |
|
|
|
|
|
|
|
struct sigaction sa; |
|
|
|
memset(&sa, 0, sizeof(sa)); |
|
|
|
sa.sa_handler = HandleSIGCONT; |
|
|
|