| Index: runtime/bin/vmservice/vmservice_io.dart
|
| diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart
|
| index 1a972d0c3e1aff3edd9a3b53c2169cae8124dd31..3b3bc26a34d09e747aeb901128d1bed663897476 100644
|
| --- a/runtime/bin/vmservice/vmservice_io.dart
|
| +++ b/runtime/bin/vmservice/vmservice_io.dart
|
| @@ -44,15 +44,7 @@ void _onSignal(ProcessSignal signal) {
|
| }
|
| }
|
|
|
| -main() {
|
| - // Get VMService.
|
| - service = new VMService();
|
| - // Start HTTP server.
|
| - server = new Server(service, _ip, _port);
|
| - if (_autoStart) {
|
| - server.startup();
|
| - }
|
| -
|
| +void registerSignalHandler() {
|
| bool useSIGQUIT = true;
|
| // Listen for SIGQUIT.
|
| if (useSIGQUIT) {
|
| @@ -66,3 +58,19 @@ main() {
|
| }
|
| }
|
|
|
| +
|
| +main() {
|
| + // Get VMService.
|
| + service = new VMService();
|
| + // Start HTTP server.
|
| + server = new Server(service, _ip, _port);
|
| + if (_autoStart) {
|
| + server.startup();
|
| + }
|
| +
|
| + try {
|
| + registerSignalHandler();
|
| + } catch (_) {
|
| + // Listening for signals will fail on Windows.
|
| + }
|
| +}
|
|
|