From ebb82bee811727823388ed7b1f429dbb19c42697 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 27 May 2011 10:01:30 -0700 Subject: [PATCH] tools: Fix missing handling of signalfd read results --- tools/get-location.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/get-location.c b/tools/get-location.c index ae156b9..620a7cc 100644 --- a/tools/get-location.c +++ b/tools/get-location.c @@ -171,6 +171,9 @@ static gboolean signal_cb(GIOChannel *channel, GIOCondition cond, gpointer data) ssize_t len; len = read(signal_fd, &si, sizeof(si)); + if (len < 0) + return TRUE; + g_main_loop_quit(event_loop); return TRUE; -- 2.7.4