From e69d5b35185123db472eecf54e18673b99f14d2f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 6 Jan 2009 11:29:35 -0300 Subject: 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. --- audio/unix.c | 1 + 1 file changed, 1 insertion(+) (limited to 'audio/unix.c') 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; -- cgit