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

Unified Diff: src/trusted/sel_universal/sel_universal.cc

Issue 10979061: Track correctly the number of secure command channel connections (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebased with master. Created 8 years, 3 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 | « src/trusted/sel_universal/rpc_universal.h ('k') | src/trusted/service_runtime/nacl_secure_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/sel_universal/sel_universal.cc
diff --git a/src/trusted/sel_universal/sel_universal.cc b/src/trusted/sel_universal/sel_universal.cc
index f6da905a0ee5c49a3cdabe575c8b46a35b916864..ceeb50c91f1bde1eb67f4cc13ec50ca31e4f3b55 100644
--- a/src/trusted/sel_universal/sel_universal.cc
+++ b/src/trusted/sel_universal/sel_universal.cc
@@ -182,6 +182,24 @@ static nacl::string ProcessArguments(int argc,
}
+static bool HandlerHardShutdown(NaClCommandLoop* ncl,
+ const vector<string>& args) {
+ UNREFERENCED_PARAMETER(ncl);
+ UNREFERENCED_PARAMETER(args);
+ NaClSrpcInvokeBySignature(&command_channel, "hard_shutdown::");
+ return true;
+}
+
+
+static bool HandlerForceShutdown(NaClCommandLoop* ncl,
+ const vector<string>& args) {
+ UNREFERENCED_PARAMETER(ncl);
+ UNREFERENCED_PARAMETER(args);
+ NaClSrpcDtor(&command_channel);
+ return true;
+}
+
+
int raii_main(int argc, char* argv[]) {
// Get the arguments to sed_ldr and the nexe module
vector<nacl::string> sel_ldr_argv;
@@ -300,6 +318,10 @@ int raii_main(int argc, char* argv[]) {
loop.AddHandler("reverse_service_dump_manifest_mappings",
HandlerReverseEmuDumpManifestMappings);
loop.AddHandler("stream_file", HandlerPnaclFileStream);
+ loop.AddHandler("wait_for_exit", HandlerWaitForExit);
+
+ loop.AddHandler("hard_shutdown", HandlerHardShutdown);
+ loop.AddHandler("force_shutdown", HandlerForceShutdown);
NaClLog(1, "populating initial vars\n");
for (map<string, string>::iterator it = initial_vars.begin();
« no previous file with comments | « src/trusted/sel_universal/rpc_universal.h ('k') | src/trusted/service_runtime/nacl_secure_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698