From: Sjoerd Simons Date: Fri, 14 Nov 2014 20:55:50 +0000 (+0100) Subject: utils: Don't create unix sockets non blocking X-Git-Tag: 0.9.2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b97c30a019e412d30337515e615433bf6f886972;p=thirdparty%2Fplymouth.git utils: Don't create unix sockets non blocking All the ply_read* functions assume the socket is doing blocking reads, so opening unix sockets in non-blocking mode doesn't seem the best idea. Specifically, this was causing ask-password to fail to read the response at times as it got a -EAGAIN back from read rather then data. --- diff --git a/src/libply/ply-utils.c b/src/libply/ply-utils.c index 8fb4f411..5c8510c5 100644 --- a/src/libply/ply-utils.c +++ b/src/libply/ply-utils.c @@ -102,7 +102,7 @@ ply_open_unix_socket (void) int fd; const int should_pass_credentials = true; - fd = socket (PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); + fd = socket (PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (fd < 0) return -1;