From 20e2c6a532dcb0c197062b9f97753e000eae3c6a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 25 Mar 2013 03:08:12 +0000 Subject: [PATCH] gui: Rename do_exit(). This function sends SIGTERM to every process in the process group of para_gui and dies thereafter. So kill_pg_and_die() is more descriptive than the old name. --- gui.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gui.c b/gui.c index 68a271a8..a34f27de 100644 --- a/gui.c +++ b/gui.c @@ -533,7 +533,8 @@ static void setup_signal_handling(void) para_sigaction(SIGHUP, SIG_IGN); } -__noreturn static void do_exit(int ret) +/* kill every process in the process group and exit */ +__noreturn static void kill_pg_and_die(int ret) { para_sigaction(SIGTERM, SIG_IGN); kill(0, SIGTERM); @@ -552,7 +553,7 @@ static void shutdown_curses(void) __noreturn static void finish(int ret) { shutdown_curses(); - do_exit(ret); + kill_pg_and_die(ret); } /* @@ -567,7 +568,7 @@ __noreturn __printf_2_3 static void msg_n_exit(int ret, const char* fmt, ...) va_start(argp, fmt); vfprintf(outfd, fmt, argp); va_end(argp); - do_exit(ret); + kill_pg_and_die(ret); } static void print_welcome(void) -- 2.39.5