From 392e13534961b80984711f82230d9f34ca4a81bb Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 21 Jan 2009 22:47:31 +0000 Subject: Handle SIGTERM (and kill-server which uses it), a bit more neatly - tidy up properly and print a nicer message. Same effect though :-) --- client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client.c') 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 @@ -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); -- cgit