diff --git a/core/authorize.php b/core/authorize.php
index 69e1909..3df8111 100644
--- a/core/authorize.php
+++ b/core/authorize.php
@@ -27,7 +27,7 @@
  * Global flag to identify update.php and authorize.php runs.
  *
  * Identifies update.php and authorize.php runs, avoiding unwanted operations
- * such as hook_init() and hook_exit() invokes, css/js preprocessing and
+ * such as hook_init() invocations, css/js preprocessing and
  * translation, and solves some theming issues. The flag is checked in other
  * places in Drupal code (not just authorize.php).
  */
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 654d849..1461aa1 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -729,7 +729,7 @@ function drupal_goto($path = '', array $options = array(), $http_response_code =
   // The "Location" header sends a redirect status code to the HTTP daemon. In
   // some cases this can be wrong, so we make sure none of the code below the
   // drupal_goto() call gets executed upon redirection.
-  drupal_exit($url);
+  drupal_exit();
 }
 
 /**
@@ -1985,17 +1985,9 @@ function l($text, $path, array $options = array()) {
  * Performs end-of-request tasks.
  *
  * There should rarely be a reason to call exit instead of drupal_exit();
- *
- * @param $destination
- *   If this function is called from drupal_goto(), then this argument
- *   will be a fully-qualified URL that is the destination of the redirect.
- *   This should be passed along to hook_exit() implementations.
  */
-function drupal_exit($destination = NULL) {
+function drupal_exit() {
   if (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL) {
-    if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') {
-      module_invoke_all('exit', $destination);
-    }
     drupal_session_commit();
   }
   exit;
diff --git a/core/includes/path.inc b/core/includes/path.inc
index 182c0c8..911cfe0 100644
--- a/core/includes/path.inc
+++ b/core/includes/path.inc
@@ -3,10 +3,6 @@
 /**
  * @file
  * Functions to handle paths in Drupal.
- *
- * These functions are not loaded for cached pages, but modules that need
- * to use them in hook exit() can make them available, by executing
- * "drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);".
  */
 
 use Symfony\Component\HttpFoundation\Request;
diff --git a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
index eb295bd..d2e1078 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
@@ -42,7 +42,6 @@ function __construct(ModuleHandlerInterface $module_handler) {
    *   The Event to process.
    */
   public function onTerminate(PostResponseEvent $event) {
-    $this->moduleHandler->invokeAll('exit');
     $request_method = $event->getRequest()->getMethod();
     // Check whether we need to write the module implementations cache. We do
     // not want to cache hooks which are only invoked on HTTP POST requests
diff --git a/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php
new file mode 100644
index 0000000..e2e02e9
--- /dev/null
+++ b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\overlay\EventSubscriber\OverlaySubscriber.
+ */
+
+namespace Drupal\overlay\EventSubscriber;
+
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
+use Symfony\Component\HttpKernel\KernelEvents;
+
+/**
+ * Overlay subscriber for controller requests.
+ */
+class OverlaySubscriber implements EventSubscriberInterface {
+
+  /**
+   * Performs end of request tasks.
+   *
+   * When viewing an overlay child page, check if we need to trigger a refresh of
+   * the supplemental regions of the overlay on the next page request.
+   */
+  public function onResponse(FilterResponseEvent $event) {
+    // Check that we are in an overlay child page.
+    if (overlay_get_mode() == 'child') {
+      // Load any markup that was stored earlier in the page request, via calls
+      // to overlay_store_rendered_content(). If none was stored, this is not a
+      // page request where we expect any changes to the overlay supplemental
+      // regions to have occurred, so we do not need to proceed any further.
+      $original_markup = overlay_get_rendered_content();
+      if (!empty($original_markup)) {
+        // Compare the original markup to the current markup that we get from
+        // rendering each overlay supplemental region now. If they don't match,
+        // something must have changed, so we request a refresh of that region
+        // within the parent window on the next page request.
+        foreach (overlay_supplemental_regions() as $region) {
+          if (!isset($original_markup[$region]) || $original_markup[$region] != overlay_render_region($region)) {
+            overlay_request_refresh($region);
+          }
+        }
+      }
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  static function getSubscribedEvents() {
+    $events[KernelEvents::RESPONSE][] = array('onResponse');
+
+    return $events;
+  }
+}
diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module
index 1cedd2e..db034f9 100644
--- a/core/modules/overlay/overlay.module
+++ b/core/modules/overlay/overlay.module
@@ -177,34 +177,6 @@ function overlay_init() {
 }
 
 /**
- * Implements hook_exit().
- *
- * When viewing an overlay child page, check if we need to trigger a refresh of
- * the supplemental regions of the overlay on the next page request.
- */
-function overlay_exit() {
-  // Check that we are in an overlay child page.
-  if (overlay_get_mode() == 'child') {
-    // Load any markup that was stored earlier in the page request, via calls
-    // to overlay_store_rendered_content(). If none was stored, this is not a
-    // page request where we expect any changes to the overlay supplemental
-    // regions to have occurred, so we do not need to proceed any further.
-    $original_markup = overlay_get_rendered_content();
-    if (!empty($original_markup)) {
-      // Compare the original markup to the current markup that we get from
-      // rendering each overlay supplemental region now. If they don't match,
-      // something must have changed, so we request a refresh of that region
-      // within the parent window on the next page request.
-      foreach (overlay_supplemental_regions() as $region) {
-        if (!isset($original_markup[$region]) || $original_markup[$region] != overlay_render_region($region)) {
-          overlay_request_refresh($region);
-        }
-      }
-    }
-  }
-}
-
-/**
  * Implements hook_library_info().
  */
 function overlay_library_info() {
@@ -698,9 +670,10 @@ function overlay_overlay_child_initialize() {
   // have an indication that something in the supplemental regions of the
   // overlay might change during the current page request. We therefore store
   // the initial rendered content of those regions here, so that we can compare
-  // it to the same content rendered in overlay_exit(), at the end of the page
-  // request. This allows us to check if anything actually did change, and, if
-  // so, trigger an immediate Ajax refresh of the parent window.
+  // it to the same content rendered in OverlaySubscriber::onResponse(),
+  // at the end of the page request. This allows us to check if anything
+  // actually did change, and, if so, trigger an immediate Ajax refresh
+  // of the parent window.
   $token = drupal_container()->get('request')->query->get('token');
   if (!empty($_POST) || isset($token)) {
     foreach (overlay_supplemental_regions() as $region) {
diff --git a/core/modules/overlay/overlay.services.yml b/core/modules/overlay/overlay.services.yml
new file mode 100644
index 0000000..c64df81
--- /dev/null
+++ b/core/modules/overlay/overlay.services.yml
@@ -0,0 +1,5 @@
+services:
+  overlay.subscriber:
+    class: Drupal\overlay\EventSubscriber\OverlaySubscriber
+    tags:
+      - { name: event_subscriber }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/HookExitTest.php b/core/modules/system/lib/Drupal/system/Tests/Bootstrap/HookExitTest.php
deleted file mode 100644
index 0a8ef18..0000000
--- a/core/modules/system/lib/Drupal/system/Tests/Bootstrap/HookExitTest.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\system\Tests\Bootstrap\HookExitTest.
- */
-
-namespace Drupal\system\Tests\Bootstrap;
-
-use Drupal\simpletest\WebTestBase;
-
-/**
- * Tests hook_exit().
- */
-class HookExitTest extends WebTestBase {
-
-  /**
-   * Modules to enable.
-   *
-   * @var array
-   */
-  public static $modules = array('system_test', 'dblog');
-
-  public static function getInfo() {
-    return array(
-      'name' => 'Exit hook invocation',
-      'description' => 'Test that hook_exit() is called correctly.',
-      'group' => 'Bootstrap',
-    );
-  }
-
-  /**
-   * Tests calling of hook_exit().
-   */
-  function testHookExit() {
-    // Test with cache disabled. Exit should always fire.
-    $config = config('system.performance');
-    $config->set('cache.page.use_internal', 0);
-    $config->save();
-
-    $this->drupalGet('');
-    $calls = 1;
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, 'hook_exit called with disabled cache.');
-
-    // Test with normal cache. On the first call, exit should fire
-    // (since cache is empty), but on the second call it should not be fired.
-    $config->set('cache.page.use_internal', 1);
-    $config->set('cache.page.max_age', 300);
-    $config->save();
-    $this->drupalGet('');
-    $calls++;
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, 'hook_exit called with normal cache and no cached page.');
-    $this->assertTrue(cache('page')->get(url('', array('absolute' => TRUE))), 'Page has been cached.');
-    $this->drupalGet('');
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, 'hook_exit not called with normal cache and a cached page.');
-
-    // Test with aggressive cache. Exit should not fire since page is cached.
-    variable_set('page_cache_invoke_hooks', FALSE);
-    $this->assertTrue(cache('page')->get(url('', array('absolute' => TRUE))), 'Page has been cached.');
-    $this->drupalGet('');
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, 'hook_exit not called with aggressive cache and a cached page.');
-
-    // Test with page cache cleared, exit should be called.
-    $this->assertTrue(db_delete('cache_page')->execute(), 'Page cache cleared.');
-    $this->drupalGet('');
-    $calls++;
-    $this->assertEqual(db_query('SELECT COUNT(*) FROM {watchdog} WHERE type = :type AND message = :message', array(':type' => 'system_test', ':message' => 'hook_exit'))->fetchField(), $calls, 'hook_exit called with aggressive cache and no cached page.');
-  }
-}
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 9d6922c..84d1f56 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -317,24 +317,6 @@ function hook_element_info_alter(&$type) {
 }
 
 /**
- * Perform cleanup tasks.
- *
- * This hook is run at the end of each non-cached page request. It is often
- * used for page logging and specialized cleanup. This hook MUST NOT print
- * anything because by the time it runs the response is already sent to the
- * browser.
- *
- * This hook is not run on cached pages.
- *
- * @param $destination
- *   If this hook is invoked as part of a drupal_goto() call, then this argument
- *   will be a fully-qualified URL that is the destination of the redirect.
- */
-function hook_exit($destination = NULL) {
-  watchdog('mymodule', 'Page was built for user %name.', array('%name' => user_format_name($GLOBALS['user'])), WATCHDOG_INFO);
-}
-
-/**
  * Perform necessary alterations to the JavaScript before it is presented on
  * the page.
  *
@@ -1350,8 +1332,6 @@ function hook_forms($form_id, $args) {
  *
  * This hook is not run on cached pages.
  *
- * @see hook_exit()
- *
  * Do not use this hook to add CSS/JS to pages, use hook_page_build() instead.
  *
  * @see hook_page_build()
diff --git a/core/modules/system/tests/modules/system_test/system_test.module b/core/modules/system/tests/modules/system_test/system_test.module
index 97c6f03..31352d6 100644
--- a/core/modules/system/tests/modules/system_test/system_test.module
+++ b/core/modules/system/tests/modules/system_test/system_test.module
@@ -140,13 +140,6 @@ function system_test_init() {
 }
 
 /**
- * Implements hook_exit().
- */
-function system_test_exit() {
-  watchdog('system_test', 'hook_exit');
-}
-
-/**
  * Implements hook_system_info_alter().
  */
 function system_test_system_info_alter(&$info, $file, $type) {
diff --git a/core/update.php b/core/update.php
index 4947d09..79e6ef0 100644
--- a/core/update.php
+++ b/core/update.php
@@ -34,7 +34,7 @@
  * Global flag indicating that update.php is being run.
  *
  * When this flag is set, various operations do not take place, such as invoking
- * hook_init() and hook_exit(), css/js preprocessing, and translation.
+ * hook_init(), css/js preprocessing, and translation.
  *
  * This constant is defined using define() instead of const so that PHP
  * versions older than 5.3 can display the proper PHP requirements instead of
