Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix windows build

  • Loading branch information...
commit cb6b9eb19e68556be5b21aba8b5542b5b4b7da2d 1 parent 8c87250
@ry ry authored
Showing with 19 additions and 4 deletions.
  1. +1 −4 node.gyp
  2. +18 −0 src/node_stdio_win32.cc
View
5 node.gyp
@@ -4,6 +4,7 @@
'target_arch': 'ia32',
'node_use_dtrace': 'false',
'node_use_openssl%': 'true',
+ 'node_use_system_openssl%': 'false',
'library_files': [
'src/node.js',
'lib/_debugger.js',
@@ -51,10 +52,6 @@
],
},
- 'includes': [
- './options.gypi'
- ],
-
'targets': [
{
'target_name': 'node',
View
18 src/node_stdio_win32.cc
@@ -664,6 +664,23 @@ static Handle<Value> StopTTYWatcher(const Arguments& args) {
return Undefined();
}
+// 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();
+}
+
void Stdio::Initialize(v8::Handle<v8::Object> target) {
init_scancode_table();
@@ -701,6 +718,7 @@ void Stdio::Initialize(v8::Handle<v8::Object> target) {
NODE_SET_METHOD(target, "destroyTTYWatcher", DestroyTTYWatcher);
NODE_SET_METHOD(target, "startTTYWatcher", StartTTYWatcher);
NODE_SET_METHOD(target, "stopTTYWatcher", StopTTYWatcher);
+ NODE_SET_METHOD(target, "unref", Unref);
}
Please sign in to comment.
Something went wrong with that request. Please try again.