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

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: Restore error handling code paths Created 6 years, 7 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..ca5a1d5f7fac7d052724de3c0a1368cc5f1636fe 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 the browser can discover
+// the sending child's 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