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

Side by Side Diff: src/shared/platform/win/nacl_exit.c

Issue 6825057: Remove printfs in exit path (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2011 The Native Client Authors. All rights reserved. 2 * Copyright 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "native_client/src/include/portability.h" 10 #include "native_client/src/include/portability.h"
11 #include "native_client/src/shared/platform/nacl_exit.h" 11 #include "native_client/src/shared/platform/nacl_exit.h"
12 #include "native_client/src/trusted/service_runtime/nacl_signal.h" 12 #include "native_client/src/trusted/service_runtime/nacl_signal.h"
13 13
14 14
15 void NaClAbort(void) { 15 void NaClAbort(void) {
16 NaClExit(-SIGABRT); 16 NaClExit(-SIGABRT);
17 } 17 }
18 18
19 void NaClExit(int err_code) { 19 void NaClExit(int err_code) {
20 #ifdef COVERAGE 20 #ifdef COVERAGE
21 /* Give coverage runs a chance to flush coverage data */ 21 /* Give coverage runs a chance to flush coverage data */
22 exit(err_code); 22 exit(err_code);
23 #else 23 #else
24 /* If the process is scheduled for termination, wait for it.*/ 24 /* If the process is scheduled for termination, wait for it.*/
25 if (TerminateProcess(GetCurrentProcess(), err_code)) { 25 if (TerminateProcess(GetCurrentProcess(), err_code)) {
26 printf("Terminate passed, but returned.\n");
27 while(1); 26 while(1);
28 } 27 }
29 printf("Terminate failed with %d.\n", GetLastError());
30 28
31 /* Otherwise use the standard C process exit to bybass destructors. */ 29 /* Otherwise use the standard C process exit to bybass destructors. */
32 ExitProcess(err_code); 30 ExitProcess(err_code);
33 #endif 31 #endif
34 } 32 }
35 33
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698