Index: runtime/bin/vmservice/vmservice_io.dart |
diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart |
index c04d485dbf27a20b724cdf7187ad3f6d4f45f5f9..4d4aee4d6c8918696a28b2f41e6cde7fc7ed7327 100644 |
--- a/runtime/bin/vmservice/vmservice_io.dart |
+++ b/runtime/bin/vmservice/vmservice_io.dart |
@@ -21,10 +21,14 @@ bool _autoStart; |
bool _isWindows = false; |
+var _signalWatch; |
+ |
// HTTP servr. |
Server server; |
Future<Server> serverFuture; |
+ |
+ |
void _bootServer() { |
// Load resources. |
_triggerResourceLoad(); |
@@ -54,18 +58,18 @@ void _onSignal(ProcessSignal signal) { |
} |
} |
-void _registerSignalHandler(Stream signalWatch(ProcessSignal signal)) { |
+void _registerSignalHandler() { |
if (_isWindows) { |
// Cannot register for signals on Windows. |
return; |
} |
- signalWatch(ProcessSignal.SIGQUIT).listen(_onSignal); |
+ _signalWatch(ProcessSignal.SIGQUIT).listen(_onSignal); |
} |
-main(Stream signalWatch(ProcessSignal signal)) { |
+main() { |
if (_autoStart) { |
_bootServer(); |
server.startup(); |
} |
- _registerSignalHandler(signalWatch); |
+ _registerSignalHandler(); |
} |