1 // Copyright (c) 2011 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.
5 #include "base/process_util.h"
9 bool KillProcesses(const FilePath::StringType
& executable_name
, int exit_code
,
10 const ProcessFilter
* filter
) {
12 NamedProcessIterator
iter(executable_name
, filter
);
13 while (const ProcessEntry
* entry
= iter
.NextProcessEntry()) {
15 result
&= KillProcessById(entry
->pid(), exit_code
, true);
17 result
&= KillProcess(entry
->pid(), exit_code
, true);