summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-21 22:47:31 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-21 22:47:31 +0000
commit392e13534961b80984711f82230d9f34ca4a81bb (patch)
treea8f40eaba5b6b9e637fa6f469de8add9caea35f0 /client.c
parent9acc26711d180e45ff827d8b88b4adbf20fab949 (diff)
Handle SIGTERM (and kill-server which uses it), a bit more neatly - tidy up
properly and print a nicer message. Same effect though :-)
Diffstat (limited to 'client.c')
-rw-r--r--client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/client.c b/client.c
index fa51727c..811d7567 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.41 2009-01-19 17:16:09 nicm Exp $ */
+/* $Id: client.c,v 1.42 2009-01-21 22:47:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -184,6 +184,11 @@ out:
return (1);
}
+ if (cctx->flags & CCTX_SHUTDOWN) {
+ printf("[server exited]\n");
+ return (0);
+ }
+
if (cctx->flags & CCTX_EXIT) {
printf("[exited]\n");
return (0);