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

Unified Diff: base/process/launch.h

Issue 831363002: Add the ability to run a callback between fork and exec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | base/process/launch_posix.cc » ('j') | base/process/process_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/launch.h
diff --git a/base/process/launch.h b/base/process/launch.h
index 0450ddf021e0faa7936bf7118951d050e185251b..5908ab61c5abc24d98930c82c487dc4ca4247b75 100644
--- a/base/process/launch.h
+++ b/base/process/launch.h
@@ -13,6 +13,7 @@
#include "base/base_export.h"
#include "base/basictypes.h"
+#include "base/callback.h"
#include "base/environment.h"
#include "base/process/process.h"
#include "base/process/process_handle.h"
@@ -122,6 +123,14 @@ struct BASE_EXPORT LaunchOptions {
bool allow_new_privs;
#endif // defined(OS_LINUX)
+#if defined(OS_POSIX)
+ // A callback to be run in immediately prior to executing the new program in
+ // the child process. Warning: If LaunchProcess was called in the presence of
+ // multiple threads, it may not be safe for this callback to perform
+ // allocations or grab locks.
+ Closure pre_exec_hook;
jln (very slow on Chromium) 2015/01/06 00:43:36 If we go this route, we should make the warning ev
+#endif
+
#if defined(OS_CHROMEOS)
// If non-negative, the specified file descriptor will be set as the launched
// process' controlling terminal.
« no previous file with comments | « no previous file | base/process/launch_posix.cc » ('j') | base/process/process_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698