summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-01-06 11:29:35 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-01-06 11:37:40 -0300
commite69d5b35185123db472eecf54e18673b99f14d2f (patch)
tree24bb279e1902feb61fc5c9410827f83f7b67a188 /audio
parent2cada66773cb8cf3a95d571fbed669a994bac2e0 (diff)
Fix client socket to always be non-blocking.
Accourding to accept man page it does not inherit flags from listening socket. This mean that any operation in the socket generated by accept may block which can render the daemon unresponsive.
Diffstat (limited to 'audio')
-rw-r--r--audio/unix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 7064d2dd..1e4dd2db 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -1195,6 +1195,7 @@ static gboolean server_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
}
debug("Accepted new client connection on unix socket (fd=%d)", cli_sk);
+ set_nonblocking(cli_sk);
client = g_new0(struct unix_client, 1);
client->sock = cli_sk;