daemon: fix infinite loop caused by SIGPIPE 22/44922/1 accepted/tizen/mobile/20150730.014245 accepted/tizen/tv/20150730.014358 accepted/tizen/wearable/20150730.014603 submit/tizen/20150729.114639
authorSuchang Woo <suchang.woo@samsung.com>
Wed, 29 Jul 2015 11:21:06 +0000 (20:21 +0900)
committerSuchang Woo <suchang.woo@samsung.com>
Wed, 29 Jul 2015 11:32:35 +0000 (20:32 +0900)
If bxt_err() makes SIGPIPE, Buxton daemon falls into infinite loop
because bxt_err() is also used in signalfd callback when SIGPIPE is
received.
bxt_err() can makes SIGPIPE if Buxton daemon is launched by systemd
and stderr is redirected to systemd-journal socket.

Change-Id: I112079fdf3c3548f7b0667b595cbd79e985c4d64
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
daemon/daemon.c

index 3146a75..1c13537 100644 (file)
@@ -69,7 +69,7 @@ static gboolean signal_cb(gint fd, GIOCondition cond, gpointer data)
                g_main_loop_quit(bxtd->loop);
                break;
        case SIGPIPE:
-               bxt_err("SIGPIPE received");
+               /* Ignore signal */
                break;
        }