blob: 4a9384c28bc97c494a7864ead3f6ca828eac8964 [file] [log] [blame]
jamescookf154aac62017-03-02 03:30:031// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_APP_SHUTDOWN_SIGNAL_HANDLERS_POSIX_H_
6#define CHROME_APP_SHUTDOWN_SIGNAL_HANDLERS_POSIX_H_
7
8#include "base/callback_forward.h"
9#include "base/memory/ref_counted.h"
10
11namespace base {
12class SingleThreadTaskRunner;
13}
14
15// Runs a background thread that installs signal handlers to watch for shutdown
16// signals like SIGTERM, SIGINT and SIGTERM. |shutdown_callback| is invoked on
17// |task_runner| which is usually the main thread's task runner.
18void InstallShutdownSignalHandlers(
19 const base::Closure& shutdown_callback,
20 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner);
21
22#endif // CHROME_APP_SHUTDOWN_SIGNAL_HANDLERS_POSIX_H_