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

Unified Diff: base/logging.cc

Issue 119335: Linux: refactor zygote support (Closed)
Patch Set: ... Created 11 years, 6 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 | « base/global_descriptors_posix.cc ('k') | base/process_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index 77e95833c3356b5d5afd2fb645fe2fa11afcf6e9..b5af671eb4f465940846f4be8156005bc2a70a93 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -19,12 +19,9 @@ typedef HANDLE MutexHandle;
#endif
#if defined(OS_POSIX)
-#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <unistd.h>
#define MAX_PATH PATH_MAX
typedef FILE* FileHandle;
@@ -40,7 +37,6 @@ typedef pthread_mutex_t* MutexHandle;
#include "base/command_line.h"
#include "base/debug_util.h"
#include "base/lock_impl.h"
-#include "base/reserved_file_descriptors.h"
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -208,20 +204,6 @@ bool InitializeLogFileHandle() {
}
}
SetFilePointer(log_file, 0, 0, FILE_END);
-#elif defined(OS_LINUX)
- // Reserve global fd slots.
- int reserved_fds[kReservedFds];
- for (int i=0; i < kReservedFds; i++)
- reserved_fds[i] = open("/dev/null", O_RDONLY, 0);
-
- log_file = fopen(log_file_name->c_str(), "a");
-
- // Release the reserved fds.
- for (int i=0; i < kReservedFds; i++)
- close(reserved_fds[i]);
-
- if (log_file == NULL)
- return false;
#elif defined(OS_POSIX)
log_file = fopen(log_file_name->c_str(), "a");
if (log_file == NULL)
« no previous file with comments | « base/global_descriptors_posix.cc ('k') | base/process_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698