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

Unified Diff: chrome/common/ipc_channel_posix.cc

Issue 113913: OSX: Close ipc channel if we're writing to a closed pipe. (Closed)
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_channel_posix.cc
diff --git a/chrome/common/ipc_channel_posix.cc b/chrome/common/ipc_channel_posix.cc
index 5080dd60a5833bf6d27f5eb08a8cdc77c363a5a2..a9a81a0f67737a513cc873aa16ef26a770c54a04 100644
--- a/chrome/common/ipc_channel_posix.cc
+++ b/chrome/common/ipc_channel_posix.cc
@@ -607,6 +607,13 @@ bool Channel::ChannelImpl::ProcessOutgoingMessages() {
msg->file_descriptor_set()->CommitAll();
if (bytes_written < 0 && errno != EAGAIN) {
+#if defined(OS_MACOSX)
+ // On OSX writing to a pipe with no listener returns EPERM.
+ if (errno == EPERM) {
+ Close();
+ return false;
+ }
+#endif // OS_MACOSX
LOG(ERROR) << "pipe error: " << strerror(errno);
return false;
}
« 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