Index: base/process_util.h |
diff --git a/base/process_util.h b/base/process_util.h |
index a692870c7e5c5540c8f1d0b9fdec81ff40bb8c2b..d20a0f9abc1c029d3ab12d13645ced7af56ec934 100644 |
--- a/base/process_util.h |
+++ b/base/process_util.h |
@@ -44,6 +44,8 @@ struct IoCounters { |
unsigned long long WriteTransferCount; |
unsigned long long OtherTransferCount; |
}; |
+ |
+#include "base/file_descriptor_shuffle.h" |
#endif |
#if defined(OS_MACOSX) |
@@ -82,7 +84,14 @@ ProcessId GetProcId(ProcessHandle process); |
#if defined(OS_POSIX) |
// Sets all file descriptors to close on exec except for stdin, stdout |
// and stderr. |
+// TODO(agl): remove this function |
+// WARNING: do not use. It's inherently race-prone in the face of |
+// multi-threading. |
void SetAllFDsToCloseOnExec(); |
+// Close all file descriptors, expect those which are a destination in the |
+// given multimap. Only call this function in a child process where you know |
+// that there aren't any other threads. |
+void CloseSuperfluousFds(const base::InjectiveMultimap& saved_map); |
#endif |
#if defined(OS_WIN) |