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

Unified Diff: content/common/zygote_commands_linux.h

Issue 269543014: Use RecvMsgWithPid to find real PID for zygote children (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to jln feedback 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
Index: content/common/zygote_commands_linux.h
diff --git a/content/common/zygote_commands_linux.h b/content/common/zygote_commands_linux.h
index 9be04624a7b394aa266b939ac9ad905879e076dd..396e9328e47e9ded589356dd0fcf5a881d98e8fb 100644
--- a/content/common/zygote_commands_linux.h
+++ b/content/common/zygote_commands_linux.h
@@ -18,6 +18,10 @@ static const char kZygoteBootMessage[] = "ZYGOTE_BOOT";
// is ready to go.
static const char kZygoteHelloMessage[] = "ZYGOTE_OK";
+// Message sent by zygote children to the browser so it can discover their
+// process ID.
+static const char kZygoteChildPingMessage[] = "CHILD_PING";
+
// Maximum allowable length for messages sent to the zygote.
const size_t kZygoteMaxMessageLength = 8192;
@@ -38,7 +42,11 @@ enum {
kZygoteCommandGetTerminationStatus = 2,
// Read a bitmask of kSandboxLinux*
- kZygoteCommandGetSandboxStatus = 3
+ kZygoteCommandGetSandboxStatus = 3,
+
+ // Not a real zygote command, but a subcommand used during the zygote fork
+ // protocol. Sends the child's PID as seen from the browser process.
+ kZygoteCommandForkRealPID = 4
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698