Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: base/process_util_linux.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process_util.h ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <dirent.h> 8 #include <dirent.h>
9 #include <string> 9 #include <string>
10 #include <sys/types.h> 10 #include <sys/types.h>
11 #include <sys/wait.h> 11 #include <sys/wait.h>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/string_tokenizer.h" 15 #include "base/string_tokenizer.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 18
19 namespace { 19 namespace {
20 20
21 enum ParsingState { 21 enum ParsingState {
22 KEY_NAME, 22 KEY_NAME,
23 KEY_VALUE 23 KEY_VALUE
24 }; 24 };
25 25
26 } // namespace 26 } // namespace
27 27
28 namespace process_util { 28 namespace base {
29 29
30 bool LaunchApp(const std::vector<std::string>& argv, 30 bool LaunchApp(const std::vector<std::string>& argv,
31 bool wait, ProcessHandle* process_handle) { 31 bool wait, ProcessHandle* process_handle) {
32 bool retval = true; 32 bool retval = true;
33 33
34 char* argv_copy[argv.size() + 1]; 34 char* argv_copy[argv.size() + 1];
35 for (size_t i = 0; i < argv.size(); i++) { 35 for (size_t i = 0; i < argv.size(); i++) {
36 argv_copy[i] = new char[argv[i].size() + 1]; 36 argv_copy[i] = new char[argv[i].size() + 1];
37 strcpy(argv_copy[i], argv[i].c_str()); 37 strcpy(argv_copy[i], argv[i].c_str());
38 } 38 }
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } else if (last_key_name == "wchar") { 315 } else if (last_key_name == "wchar") {
316 (*io_counters).WriteTransferCount = StringToInt64(tokenizer.token()); 316 (*io_counters).WriteTransferCount = StringToInt64(tokenizer.token());
317 } 317 }
318 state = KEY_NAME; 318 state = KEY_NAME;
319 break; 319 break;
320 } 320 }
321 } 321 }
322 return true; 322 return true;
323 } 323 }
324 324
325 } // namespace process_util 325 } // namespace base
OLDNEW
« no previous file with comments | « base/process_util.h ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698