gui: Rename do_exit().
authorAndre Noll <maan@systemlinux.org>
Mon, 25 Mar 2013 03:08:12 +0000 (03:08 +0000)
committerAndre Noll <maan@systemlinux.org>
Thu, 2 May 2013 17:56:08 +0000 (19:56 +0200)
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

diff --git a/gui.c b/gui.c
index 68a271a898a49a82f6499bd145cd9956e1c4a5f3..a34f27de5e40cb0adbb2d652d18586c955d88a90 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -533,7 +533,8 @@ static void setup_signal_handling(void)
        para_sigaction(SIGHUP, SIG_IGN);
 }
 
        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);
 {
        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();
 __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);
        va_start(argp, fmt);
        vfprintf(outfd, fmt, argp);
        va_end(argp);
-       do_exit(ret);
+       kill_pg_and_die(ret);
 }
 
 static void print_welcome(void)
 }
 
 static void print_welcome(void)