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

Side by Side Diff: src/trusted/sel_universal/sel_universal.cc

Issue 10180015: Split SelLdrLauncher into SelLdrLauncher{Standalone,Chrome} classes (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Copyright Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/trusted/sel_universal/reverse_emulate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 // Second generation sel_universal implemented in C++ 7 // Second generation sel_universal implemented in C++
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 10
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 int fd = open(PORTABLE_DEV_NULL, O_RDWR); 186 int fd = open(PORTABLE_DEV_NULL, O_RDWR);
187 sel_ldr_argv.push_back("-w"); 187 sel_ldr_argv.push_back("-w");
188 ss_stdout << "1:" << fd; 188 ss_stdout << "1:" << fd;
189 sel_ldr_argv.push_back(ss_stdout.str()); 189 sel_ldr_argv.push_back(ss_stdout.str());
190 sel_ldr_argv.push_back("-w"); 190 sel_ldr_argv.push_back("-w");
191 ss_stderr << "2:" << fd; 191 ss_stderr << "2:" << fd;
192 sel_ldr_argv.push_back(ss_stderr.str()); 192 sel_ldr_argv.push_back(ss_stderr.str());
193 } 193 }
194 // Start sel_ldr with the given application and arguments. 194 // Start sel_ldr with the given application and arguments.
195 nacl::SelLdrLauncher launcher; 195 nacl::SelLdrLauncherStandalone launcher;
196 nacl::DescWrapperFactory factory; // DescWrapper "namespace" 196 nacl::DescWrapperFactory factory; // DescWrapper "namespace"
197 197
198 if (!launcher.StartViaCommandLine(command_prefix, sel_ldr_argv, app_argv)) { 198 if (!launcher.StartViaCommandLine(command_prefix, sel_ldr_argv, app_argv)) {
199 NaClLog(LOG_FATAL, "sel_universal: Failed to launch sel_ldr\n"); 199 NaClLog(LOG_FATAL, "sel_universal: Failed to launch sel_ldr\n");
200 } 200 }
201 201
202 DescWrapper *host_file = factory.OpenHostFile(app_name.c_str(), O_RDONLY, 0); 202 DescWrapper *host_file = factory.OpenHostFile(app_name.c_str(), O_RDONLY, 0);
203 if (NULL == host_file) { 203 if (NULL == host_file) {
204 NaClLog(LOG_ERROR, "Could not open %s\n", app_name.c_str()); 204 NaClLog(LOG_ERROR, "Could not open %s\n", app_name.c_str());
205 exit(1); 205 exit(1);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 NaClSrpcModuleInit(); 290 NaClSrpcModuleInit();
291 NaClNrdAllModulesInit(); 291 NaClNrdAllModulesInit();
292 292
293 int exit_status = raii_main(argc, argv); 293 int exit_status = raii_main(argc, argv);
294 294
295 NaClSrpcModuleFini(); 295 NaClSrpcModuleFini();
296 NaClNrdAllModulesFini(); 296 NaClNrdAllModulesFini();
297 297
298 return exit_status; 298 return exit_status;
299 } 299 }
OLDNEW
« no previous file with comments | « src/trusted/sel_universal/reverse_emulate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698