add a flag to disable the signalhandler
This commit is contained in:
parent
b29af954f6
commit
79bbde8766
|
@ -148,6 +148,7 @@ int main(int argc, char *argv[]) {
|
||||||
bool delete_layout_path;
|
bool delete_layout_path;
|
||||||
bool only_check_config = false;
|
bool only_check_config = false;
|
||||||
bool force_xinerama = false;
|
bool force_xinerama = false;
|
||||||
|
bool disable_signalhandler = false;
|
||||||
xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS];
|
xcb_intern_atom_cookie_t atom_cookies[NUM_ATOMS];
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
{"no-autostart", no_argument, 0, 'a'},
|
{"no-autostart", no_argument, 0, 'a'},
|
||||||
|
@ -157,6 +158,7 @@ int main(int argc, char *argv[]) {
|
||||||
{"layout", required_argument, 0, 'L'},
|
{"layout", required_argument, 0, 'L'},
|
||||||
{"restart", required_argument, 0, 0},
|
{"restart", required_argument, 0, 0},
|
||||||
{"force-xinerama", no_argument, 0, 0},
|
{"force-xinerama", no_argument, 0, 0},
|
||||||
|
{"disable-signalhandler", no_argument, 0, 0},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
int option_index = 0, opt;
|
int option_index = 0, opt;
|
||||||
|
@ -189,7 +191,7 @@ int main(int argc, char *argv[]) {
|
||||||
only_check_config = true;
|
only_check_config = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("i3 version " I3_VERSION " © 2009 Michael Stapelberg and contributors\n");
|
printf("i3 version " I3_VERSION " © 2009-2011 Michael Stapelberg and contributors\n");
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
case 'V':
|
case 'V':
|
||||||
set_verbosity(true);
|
set_verbosity(true);
|
||||||
|
@ -210,6 +212,9 @@ int main(int argc, char *argv[]) {
|
||||||
"Please check if your driver really does not support RandR "
|
"Please check if your driver really does not support RandR "
|
||||||
"and disable this option as soon as you can.\n");
|
"and disable this option as soon as you can.\n");
|
||||||
break;
|
break;
|
||||||
|
} else if (strcmp(long_options[option_index].name, "disable-signalhandler") == 0) {
|
||||||
|
disable_signalhandler = true;
|
||||||
|
break;
|
||||||
} else if (strcmp(long_options[option_index].name, "restart") == 0) {
|
} else if (strcmp(long_options[option_index].name, "restart") == 0) {
|
||||||
FREE(layout_path);
|
FREE(layout_path);
|
||||||
layout_path = sstrdup(optarg);
|
layout_path = sstrdup(optarg);
|
||||||
|
@ -494,6 +499,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
manage_existing_windows(root);
|
manage_existing_windows(root);
|
||||||
|
|
||||||
|
if (!disable_signalhandler)
|
||||||
setup_signal_handler();
|
setup_signal_handler();
|
||||||
|
|
||||||
/* Ignore SIGPIPE to survive errors when an IPC client disconnects
|
/* Ignore SIGPIPE to survive errors when an IPC client disconnects
|
||||||
|
|
Loading…
Reference in New Issue