projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5312f21
)
connection: Handle broken pipes in sendmsg
author
Benjamin Franzke
<benjaminfranzke@googlemail.com>
Sat, 29 Jan 2011 12:12:39 +0000
(13:12 +0100)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Mon, 31 Jan 2011 01:56:09 +0000
(20:56 -0500)
wayland/connection.c
patch
|
blob
|
history
diff --git
a/wayland/connection.c
b/wayland/connection.c
index
f83979c
..
64d62db
100644
(file)
--- a/
wayland/connection.c
+++ b/
wayland/connection.c
@@
-265,10
+265,12
@@
wl_connection_data(struct wl_connection *connection, uint32_t mask)
msg.msg_flags = 0;
do {
- len = sendmsg(connection->fd, &msg,
0
);
+ len = sendmsg(connection->fd, &msg,
MSG_NOSIGNAL
);
} while (len < 0 && errno == EINTR);
- if (len < 0) {
+ if (len == -1 && errno == EPIPE) {
+ return -1;
+ } else if (len < 0) {
fprintf(stderr,
"write error for connection %p, fd %d: %m\n",
connection, connection->fd);