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

Side by Side Diff: runtime/bin/process_android.cc

Issue 2618723002: Workaround attempt for timeout flakiness: Avoid running atexit() handlers in fork()ed process on li… (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | runtime/bin/process_linux.cc » ('j') | runtime/bin/process_linux.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #if !defined(DART_IO_DISABLED) 5 #if !defined(DART_IO_DISABLED)
6 6
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #if defined(TARGET_OS_ANDROID) 8 #if defined(TARGET_OS_ANDROID)
9 9
10 #include "bin/process.h" 10 #include "bin/process.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (!running_) { 158 if (!running_) {
159 return; 159 return;
160 } 160 }
161 161
162 // Set terminate_done_ to false, so we can use it as a guard for our 162 // Set terminate_done_ to false, so we can use it as a guard for our
163 // monitor. 163 // monitor.
164 running_ = false; 164 running_ = false;
165 165
166 // Fork to wake up waitpid. 166 // Fork to wake up waitpid.
167 if (TEMP_FAILURE_RETRY(fork()) == 0) { 167 if (TEMP_FAILURE_RETRY(fork()) == 0) {
168 exit(0); 168 _exit(0);
Vyacheslav Egorov (Google) 2017/01/05 12:43:37 Please leave a comment here why _exit and not exit
kustermann 2017/01/05 12:55:34 Done.
169 } 169 }
170 170
171 monitor_->Notify(); 171 monitor_->Notify();
172 172
173 while (!terminate_done_) { 173 while (!terminate_done_) {
174 monitor_->Wait(Monitor::kNoTimeout); 174 monitor_->Wait(Monitor::kNoTimeout);
175 } 175 }
176 } 176 }
177 177
178 private: 178 private:
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL)); 990 VOID_NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
991 } 991 }
992 } 992 }
993 993
994 } // namespace bin 994 } // namespace bin
995 } // namespace dart 995 } // namespace dart
996 996
997 #endif // defined(TARGET_OS_ANDROID) 997 #endif // defined(TARGET_OS_ANDROID)
998 998
999 #endif // !defined(DART_IO_DISABLED) 999 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/process_linux.cc » ('j') | runtime/bin/process_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698