summaryrefslogtreecommitdiff
path: root/sys/shm
diff options
context:
space:
mode:
authorAleix Conchillo Flaqué <aleix@oblong.com>2014-02-10 14:33:49 -0800
committerOlivier Crête <olivier.crete@collabora.com>2014-02-10 18:03:18 -0500
commitf5a1ccd0deb8d82c6befab358e942739ed609b25 (patch)
treef8c1d6e5ceb6f62a790859e00970718e6ae57d51 /sys/shm
parent73d9a8b0c97303b3415415efad2df4bef83cc3e6 (diff)
downloadgstreamer-plugins-bad-f5a1ccd0deb8d82c6befab358e942739ed609b25.tar.gz
shm: use shutdown() instead of close()
we make sure both ends get notified when the socket is closed by using shutdown() instead of close(). https://bugzilla.gnome.org/show_bug.cgi?id=724077
Diffstat (limited to 'sys/shm')
-rw-r--r--sys/shm/shmpipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/shm/shmpipe.c b/sys/shm/shmpipe.c
index d72185999..e75fe308a 100644
--- a/sys/shm/shmpipe.c
+++ b/sys/shm/shmpipe.c
@@ -429,7 +429,7 @@ sp_writer_close (ShmPipe * self, sp_buffer_free_callback callback,
void *user_data)
{
if (self->main_socket >= 0)
- close (self->main_socket);
+ shutdown (self->main_socket, SHUT_RDWR);
if (self->socket_path) {
unlink (self->socket_path);
@@ -840,7 +840,7 @@ sp_writer_accept_client (ShmPipe * self)
return client;
error:
- close (fd);
+ shutdown (fd, SHUT_RDWR);
return NULL;
}
@@ -892,7 +892,7 @@ sp_writer_close_client (ShmPipe * self, ShmClient * client,
ShmBuffer *buffer = NULL, *prev_buf = NULL;
ShmClient *item = NULL, *prev_item = NULL;
- close (client->fd);
+ shutdown (client->fd, SHUT_RDWR);
again:
for (buffer = self->buffers; buffer; buffer = buffer->next) {