1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +02:00

core: quit WeeChat on ctrl-C (signal SIGINT) in headless mode

This commit is contained in:
Sébastien Helleu
2018-03-16 20:10:57 +01:00
parent 84f4e31425
commit 71999e17c6
3 changed files with 20 additions and 3 deletions
+4 -2
View File
@@ -88,7 +88,7 @@ time_t weechat_first_start_time = 0; /* start time (used by /uptime cmd) */
int weechat_upgrade_count = 0; /* number of /upgrade done */
struct timeval weechat_current_start_timeval; /* start time used to display */
/* duration of /upgrade */
int weechat_quit = 0; /* = 1 if quit request from user */
volatile sig_atomic_t weechat_quit = 0; /* = 1 if quit request from user */
volatile sig_atomic_t weechat_quit_signal = 0; /* signal received, */
/* WeeChat must quit */
char *weechat_home = NULL; /* home dir. (default: ~/.weechat) */
@@ -421,7 +421,9 @@ weechat_startup_message ()
{
if (weechat_headless)
{
string_fprintf (stdout, _("WeeChat is running in headless mode."));
string_fprintf (stdout,
_("WeeChat is running in headless mode "
"(Ctrl-C to quit)."));
string_fprintf (stdout, "\n");
}
+1 -1
View File
@@ -105,7 +105,7 @@ extern int weechat_first_start;
extern time_t weechat_first_start_time;
extern struct timeval weechat_current_start_timeval;
extern int weechat_upgrade_count;
extern int weechat_quit;
extern volatile sig_atomic_t weechat_quit;
extern volatile sig_atomic_t weechat_quit_signal;
extern char *weechat_home;
extern char *weechat_local_charset;