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

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

Issue 23903007: Remove ASSERT which was reported as a race by ThreadSanitizer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_android.cc ('k') | runtime/bin/process_macos.cc » ('j') | no next file with comments »
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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_LINUX)
7 7
8 #include "bin/process.h" 8 #include "bin/process.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // Mark write end non-blocking. 146 // Mark write end non-blocking.
147 FDUtils::SetNonBlocking(sig_chld_fds_[1]); 147 FDUtils::SetNonBlocking(sig_chld_fds_[1]);
148 148
149 // Thread started and the ExitCodeHandler is initialized. 149 // Thread started and the ExitCodeHandler is initialized.
150 initialized_ = true; 150 initialized_ = true;
151 return true; 151 return true;
152 } 152 }
153 153
154 // Get the write end of the pipe. 154 // Get the write end of the pipe.
155 static int WakeUpFd() { 155 static int WakeUpFd() {
156 ASSERT(initialized_);
157 return sig_chld_fds_[1]; 156 return sig_chld_fds_[1];
158 } 157 }
159 158
160 static void TerminateExitCodeThread() { 159 static void TerminateExitCodeThread() {
161 MutexLocker locker(mutex_); 160 MutexLocker locker(mutex_);
162 if (!initialized_) { 161 if (!initialized_) {
163 return; 162 return;
164 } 163 }
165 164
166 uint8_t data = kThreadTerminateByte; 165 uint8_t data = kThreadTerminateByte;
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 695
697 696
698 intptr_t Process::CurrentProcessId() { 697 intptr_t Process::CurrentProcessId() {
699 return static_cast<intptr_t>(getpid()); 698 return static_cast<intptr_t>(getpid());
700 } 699 }
701 700
702 } // namespace bin 701 } // namespace bin
703 } // namespace dart 702 } // namespace dart
704 703
705 #endif // defined(TARGET_OS_LINUX) 704 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/bin/process_android.cc ('k') | runtime/bin/process_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698