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

Unified Diff: base/process_util_linux.cc

Issue 18447: Share DidProcessCrash between Linux and Mac. (Closed)
Patch Set: Created 11 years, 11 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | base/process_util_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_linux.cc
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index fff9a6d8274c6e21a75208fd226512e1c5541777..d53b2c73ef8812d722182cd674873494fcd0a85f 100644
--- a/base/process_util_linux.cc
+++ b/base/process_util_linux.cc
@@ -85,6 +85,7 @@ bool LaunchApp(const std::vector<std::string>& argv,
return retval;
}
+
bool LaunchApp(const CommandLine& cl,
bool wait, bool start_hidden,
ProcessHandle* process_handle) {
@@ -92,31 +93,6 @@ bool LaunchApp(const CommandLine& cl,
return LaunchApp(cl.argv(), no_files, wait, process_handle);
}
-bool DidProcessCrash(ProcessHandle handle) {
- int status;
- if (waitpid(handle, &status, WNOHANG)) {
- // I feel like dancing!
- return false;
- }
-
- if (WIFSIGNALED(status)) {
- switch(WTERMSIG(status)) {
- case SIGSEGV:
- case SIGILL:
- case SIGABRT:
- case SIGFPE:
- return true;
- default:
- return false;
- }
- }
-
- if (WIFEXITED(status))
- return WEXITSTATUS(status) != 0;
-
- return false;
-}
-
NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name,
const ProcessFilter* filter)
: executable_name_(executable_name), filter_(filter) {
« no previous file with comments | « no previous file | base/process_util_posix.cc » ('j') | base/process_util_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698