spice-vdagent/0006-vdagent-Respond-to-SIGTERM-in-the-connect-to-daemon-.patch

32 lines
955 B
Diff
Raw Normal View History

From 56fc8d0cc19dae7170fb515e5264c7db7df5773f Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Fri, 15 Jul 2011 11:52:42 +0200
Subject: [linux-vdagent PATCH] vdagent: Respond to SIGTERM in the connect to
daemon loop
---
src/vdagent.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vdagent.c b/src/vdagent.c
index 5371ca2..f0d3b32 100644
--- a/src/vdagent.c
+++ b/src/vdagent.c
@@ -93,11 +93,11 @@ void daemon_read_complete(struct udscs_connection **connp,
int client_setup(int reconnect)
{
- while (1) {
+ while (!quit) {
client = udscs_connect(VDAGENTD_SOCKET, daemon_read_complete, NULL,
vdagentd_messages, VDAGENTD_NO_MESSAGES,
verbose ? logfile : NULL, logfile);
- if (client || !reconnect) {
+ if (client || !reconnect || quit) {
break;
}
sleep(1);
--
1.7.5.1