Index: crash_collector.cc |
diff --git a/crash_collector.cc b/crash_collector.cc |
index 89fe41de46cf2c81ab6b65472fa137f42317f654..926ee519f07a5bd0dcc7908b2cc845d7d6cf049d 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)); |
petkov
2011/01/24 18:36:04
space after ,
kmixter1
2011/01/25 21:28:07
Done.
|
if (output_handle < 0) { |
logger_->LogError("Could not create %s: %d", output_file, errno); |
// Avoid exit() to avoid atexit handlers from parent. |