diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2017-09-04 10:39:58 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2017-09-04 10:40:40 +0300 |
commit | 91edec25dd2a50e44b970296e55e1570c3e0d33c (patch) | |
tree | 608c9edceb601b5bb12b3f3ae3e7f2ae5840bb21 /tests/examples | |
parent | 6ef65f550b5fed24e4f8592a82b901140c0cf342 (diff) | |
download | gstreamer-plugins-bad-91edec25dd2a50e44b970296e55e1570c3e0d33c.tar.gz |
examples: ipcpipeline: get rid of yet another use of SOCK_NONBLOCK
https://bugzilla.gnome.org/show_bug.cgi?id=786763
Diffstat (limited to 'tests/examples')
-rw-r--r-- | tests/examples/ipcpipeline/ipc-play.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/examples/ipcpipeline/ipc-play.c b/tests/examples/ipcpipeline/ipc-play.c index 805bbcca8..8c817a2c9 100644 --- a/tests/examples/ipcpipeline/ipc-play.c +++ b/tests/examples/ipcpipeline/ipc-play.c @@ -969,10 +969,16 @@ main (gint argc, gchar ** argv) return 1; } - if (socketpair (AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0, pipes)) { + if (socketpair (AF_UNIX, SOCK_STREAM, 0, pipes)) { fprintf (stderr, "Error creating pipes: %s\n", strerror (errno)); return 2; } + if (fcntl (pipes[0], F_SETFL, O_NONBLOCK) < 0 || + fcntl (pipes[1], F_SETFL, O_NONBLOCK) < 0) { + fprintf (stderr, "Error setting O_NONBLOCK on pipes: %s\n", + strerror (errno)); + return 2; + } pid = fork (); if (pid < 0) { |