Handle SIGTERM (and kill-server which uses it), a bit more neatly - tidy up

properly and print a nicer message. Same effect though :-)
This commit is contained in:
Nicholas Marriott
2009-01-21 22:47:31 +00:00
parent 9acc26711d
commit 392e135349
6 changed files with 72 additions and 10 deletions

View File

@ -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);