Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[fix bin] Don't use signal watchers on Windows

  • Loading branch information...
commit dea4c8d8433d89141286ddd686678305332080f4 1 parent 195e0ea
@mmalecki mmalecki authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 bin/http-server
View
13 bin/http-server
@@ -39,7 +39,12 @@ function onListening() {
var server = httpServer.createServer(options);
server.listen(port, host, onListening);
-process.on('SIGINT', function () {
- log('http-server stopped.'.red);
- process.exit();
-});
+if (process.platform !== 'win32') {
+ //
+ // Signal handlers don't work on Windows.
+ //
+ process.on('SIGINT', function () {
+ log('http-server stopped.'.red);
+ process.exit();
+ });
+}
Please sign in to comment.
Something went wrong with that request. Please try again.