]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
utils: Don't create unix sockets non blocking
authorSjoerd Simons <sjoerd@luon.net>
Fri, 14 Nov 2014 20:55:50 +0000 (21:55 +0100)
committerRay Strode <rstrode@redhat.com>
Mon, 17 Nov 2014 14:38:14 +0000 (09:38 -0500)
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.

src/libply/ply-utils.c

index 8fb4f411ce7e05deb4486ed3d2bcfeb48d2bf55c..5c8510c53256d5fe8e8ba0b8a8c85528b1ca3fdc 100644 (file)
@@ -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;