From e51aef7f3c0182a47ee3188f01562a9ff8dffefc Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Tue, 13 Jul 2010 23:45:24 -0700 Subject: [PATCH] Move signal_watcher to extension model. --- src/node.cc | 4 ---- src/node_extensions.h | 1 + src/node_signal_watcher.cc | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/node.cc b/src/node.cc index b73292c42ce292..87a2bb48fb33ea 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1597,10 +1597,6 @@ static Handle Binding(const Arguments& args) { StatWatcher::Initialize(exports); File::Initialize(exports); binding_cache->Set(module, exports); - } else if (!strcmp(*module_v, "signal_watcher")) { - exports = Object::New(); - SignalWatcher::Initialize(exports); - binding_cache->Set(module, exports); } else if (!strcmp(*module_v, "http_parser")) { exports = Object::New(); InitHttpParser(exports); diff --git a/src/node_extensions.h b/src/node_extensions.h index 504657961ba270..8ec1d53993d6aa 100644 --- a/src/node_extensions.h +++ b/src/node_extensions.h @@ -5,6 +5,7 @@ NODE_EXT_LIST_ITEM(node_cares) NODE_EXT_LIST_ITEM(node_crypto) #endif NODE_EXT_LIST_ITEM(node_net) +NODE_EXT_LIST_ITEM(node_signal_watcher) NODE_EXT_LIST_ITEM(node_stdio) NODE_EXT_LIST_END diff --git a/src/node_signal_watcher.cc b/src/node_signal_watcher.cc index 21f86646d29332..305c06a88a2262 100644 --- a/src/node_signal_watcher.cc +++ b/src/node_signal_watcher.cc @@ -96,3 +96,5 @@ void SignalWatcher::Stop () { } } // namespace node + +NODE_MODULE(node_signal_watcher, node::SignalWatcher::Initialize);