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

Unified Diff: crash_collector.cc

Issue 6297004: crash-reporter: Add diagnostics to help diagnose failures in the wild (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git@master
Patch Set: respond to review Created 9 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 | « crash_collector.h ('k') | crash_collector_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crash_collector.cc
diff --git a/crash_collector.cc b/crash_collector.cc
index 89fe41de46cf2c81ab6b65472fa137f42317f654..afd72d1e129757c3a5f992abac0171d47d826057 100644
--- a/crash_collector.cc
+++ b/crash_collector.cc
@@ -110,7 +110,8 @@ int CrashCollector::ForkExecAndPipe(std::vector<const char *> &arguments,
}
if (pid == 0) {
- int output_handle = HANDLE_EINTR(creat(output_file, 0600));
+ int output_handle = HANDLE_EINTR(
+ open(output_file, O_CREAT | O_WRONLY | O_TRUNC | O_EXCL, 0666));
if (output_handle < 0) {
logger_->LogError("Could not create %s: %d", output_file, errno);
// Avoid exit() to avoid atexit handlers from parent.
« no previous file with comments | « crash_collector.h ('k') | crash_collector_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698