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: runtime/bin/process_linux.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
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_LINUX) 8 #if defined(TARGET_OS_LINUX)
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 ditto
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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 sigaction(signal, &act, NULL); 987 sigaction(signal, &act, NULL);
988 } 988 }
989 } 989 }
990 990
991 } // namespace bin 991 } // namespace bin
992 } // namespace dart 992 } // namespace dart
993 993
994 #endif // defined(TARGET_OS_LINUX) 994 #endif // defined(TARGET_OS_LINUX)
995 995
996 #endif // !defined(DART_IO_DISABLED) 996 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« runtime/bin/process_android.cc ('K') | « runtime/bin/process_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698