diff --git a/bin/webpack-dev-server.js b/bin/webpack-dev-server.js
index <HASH>..<HASH> 100755
--- a/bin/webpack-dev-server.js
+++ b/bin/webpack-dev-server.js
@@ -361,6 +361,14 @@ function startDevServer(wpOpt, options) {
 		throw e;
 	}
 
+	["SIGINT", "SIGTERM"].forEach(function(sig) {
+		process.on(sig, function() {
+			console.log(`Gracefully shutting down server after ${sig}...`);
+			server.close();
+			process.exit();  // eslint-disable-line no-process-exit
+		});
+	});
+
 	if(options.socket) {
 		server.listeningApp.on("error", function(e) {
 			if(e.code === "EADDRINUSE") {
Explicitely but gracefully handle SIGINT and SIGTERM signals. (#<I>)

Fixes #<I>.