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

Side by Side Diff: chrome/common/child_process_host.cc

Issue 93147: POSIX: don't spawn zombies. (Closed)
Patch Set: ... Created 11 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
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/common.vcproj » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/child_process_host.h" 5 #include "chrome/common/child_process_host.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 resource_dispatcher_host_->ui_loop()->PostTask( 110 resource_dispatcher_host_->ui_loop()->PostTask(
111 FROM_HERE, new ChildNotificationTask(type, this)); 111 FROM_HERE, new ChildNotificationTask(type, this));
112 } 112 }
113 113
114 void ChildProcessHost::OnWaitableEventSignaled(base::WaitableEvent *event) { 114 void ChildProcessHost::OnWaitableEventSignaled(base::WaitableEvent *event) {
115 #if defined(OS_WIN) 115 #if defined(OS_WIN)
116 HANDLE object = event->handle(); 116 HANDLE object = event->handle();
117 DCHECK(handle()); 117 DCHECK(handle());
118 DCHECK_EQ(object, handle()); 118 DCHECK_EQ(object, handle());
119 119
120 bool did_crash = base::DidProcessCrash(object); 120 bool did_crash = base::DidProcessCrash(NULL, object);
121 if (did_crash) { 121 if (did_crash) {
122 // Report that this child process crashed. 122 // Report that this child process crashed.
123 Notify(NotificationType::CHILD_PROCESS_CRASHED); 123 Notify(NotificationType::CHILD_PROCESS_CRASHED);
124 } 124 }
125 // Notify in the main loop of the disconnection. 125 // Notify in the main loop of the disconnection.
126 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED); 126 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED);
127 #endif 127 #endif
128 128
129 delete this; 129 delete this;
130 } 130 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 return *iterator_; 215 return *iterator_;
216 } while (true); 216 } while (true);
217 217
218 return NULL; 218 return NULL;
219 } 219 }
220 220
221 bool ChildProcessHost::Iterator::Done() { 221 bool ChildProcessHost::Iterator::Done() {
222 return iterator_ == Singleton<ChildProcessList>::get()->end(); 222 return iterator_ == Singleton<ChildProcessList>::get()->end();
223 } 223 }
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/common.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698