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

Unified Diff: content/public/common/zygote_fork_delegate_linux.h

Issue 240463005: Stop using chrome-sandbox to determine real pids (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix an embarassing number of compile errors Created 6 years, 8 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 | « content/public/common/child_process_sandbox_support_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/zygote_fork_delegate_linux.h
diff --git a/content/public/common/zygote_fork_delegate_linux.h b/content/public/common/zygote_fork_delegate_linux.h
index 39833c5262ec7334f486fef1cfb71b9c273d5157..4f3b43aa39c5293820667b777051dfadacfaddc7 100644
--- a/content/public/common/zygote_fork_delegate_linux.h
+++ b/content/public/common/zygote_fork_delegate_linux.h
@@ -49,18 +49,19 @@ class ZygoteForkDelegate {
enum {
// Used to pass in the descriptor for talking to the Browser
kBrowserFDIndex,
- // The next two are used in the protocol for discovering the
- // child processes real PID from within the SUID sandbox. See
- // http://code.google.com/p/chromium/wiki/LinuxZygote
- kDummyFDIndex,
+ // Used to pass in the descriptor for talking to the fork parent process.
+ // After forking, the child process is responsible for discovering its own
+ // global process ID and sending it to the parent via this descriptor.
+ // See http://code.google.com/p/chromium/wiki/LinuxZygote
kParentFDIndex,
kNumPassedFDs // Number of FDs in the vector passed to Fork().
};
// Delegate forks, returning a -1 on failure. Outside the
// suid sandbox, Fork() returns the Linux process ID.
- // This method is not aware of any potential pid namespaces, so it'll
- // return a raw pid just like fork() would.
+ // The child process is expected to send its global pid to the parent process
+ // (see kParentFDIndex above), but this function still returns a raw pid just
+ // like fork() would.
// Delegate is responsible for communicating the channel ID to the
// newly created child process.
virtual pid_t Fork(const std::string& process_type,
« no previous file with comments | « content/public/common/child_process_sandbox_support_linux.h ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698