examples: ipcpipeline: get rid of yet another use of SOCK_NONBLOCK

https://bugzilla.gnome.org/show_bug.cgi?id=786763
This commit is contained in:
George Kiagiadakis 2017-09-04 10:39:58 +03:00
parent 6ef65f550b
commit 91edec25dd

View file

@ -969,10 +969,16 @@ main (gint argc, gchar ** argv)
return 1; 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)); fprintf (stderr, "Error creating pipes: %s\n", strerror (errno));
return 2; 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 (); pid = fork ();
if (pid < 0) { if (pid < 0) {