blob: cc0902e15c90d24f0d469cc3f7b79689f7cc11cf [file] [log] [blame]
Avi Drissmane4622aa2022-09-08 20:36:061// Copyright 2013 The Chromium Authors
[email protected]307af212013-07-10 18:36:092// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "base/process/kill.h"
6
[email protected]307af212013-07-10 18:36:097#include <windows.h>
Bruce Dawsona1e1cfcb2022-11-22 20:04:358
avibeced7c2015-12-24 06:47:599#include <io.h>
10#include <stdint.h>
[email protected]307af212013-07-10 18:36:0911
Takuto Ikutac8d6b16f2024-04-15 16:59:1912#include <algorithm>
13
[email protected]307af212013-07-10 18:36:0914#include "base/logging.h"
Hans Wennborgafeb3902020-06-17 14:42:2915#include "base/notreached.h"
wfhfa40c2722016-07-26 01:12:2816#include "base/process/memory.h"
[email protected]307af212013-07-10 18:36:0917#include "base/process/process_iterator.h"
[email protected]307af212013-07-10 18:36:0918
19namespace base {
20
[email protected]307af212013-07-10 18:36:0921TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
Wez05c2c682017-08-17 16:20:1122 DCHECK(exit_code);
23
[email protected]307af212013-07-10 18:36:0924 DWORD tmp_exit_code = 0;
25
26 if (!::GetExitCodeProcess(handle, &tmp_exit_code)) {
[email protected]ad8cfa92014-05-21 20:06:23