blob: e1c7bb67fc5ff535c8e2adf49e7c1b1501abdff9 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/chrome_cleaner/os/early_exit.h"
#include <windows.h>
#include "base/logging.h"
namespace chrome_cleaner {
void EarlyExit(int exit_code) {
// Terminate immediately. This terminates more forcefully than _exit(). See
// for more details.
LOG(ERROR) << "Early exit with code " << exit_code;
::TerminateProcess(::GetCurrentProcess(), exit_code);
} // namespace chrome_cleaner