summaryrefslogtreecommitdiffstats
path: root/base/process_util_linux.cc
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 13:50:11 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-21 13:50:11 +0000
commit9c19aa146af6d80de43f00fd109a43bb8f018b24 (patch)
treef6e24c6a65f6910afc07e7bd29e491ba76ed635f /base/process_util_linux.cc
parent99c062e9d492c33dba76452834b2b03683a91684 (diff)
downloadchromium_src-9c19aa146af6d80de43f00fd109a43bb8f018b24.zip
chromium_src-9c19aa146af6d80de43f00fd109a43bb8f018b24.tar.gz
chromium_src-9c19aa146af6d80de43f00fd109a43bb8f018b24.tar.bz2
Share DidProcessCrash between Linux and Mac.
Review URL: http://codereview.chromium.org/18447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_linux.cc')
-rw-r--r--base/process_util_linux.cc26
1 files changed, 1 insertions, 25 deletions
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index fff9a6d..d53b2c7 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) {