commit
b3faf9fca9
|
@ -1582,7 +1582,7 @@ void cmd_layout_toggle(I3_CMD, const char *toggle_mode) {
|
|||
*/
|
||||
void cmd_exit(I3_CMD) {
|
||||
LOG("Exiting due to user command.\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
/* unreached */
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ static void push_string(const char *identifier, char *str) {
|
|||
fprintf(stderr, "BUG: commands_parser stack full. This means either a bug "
|
||||
"in the code, or a new command which contains more than "
|
||||
"10 identified tokens.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// TODO move to a common util
|
||||
|
@ -128,7 +128,7 @@ static void push_long(const char *identifier, long num) {
|
|||
fprintf(stderr, "BUG: commands_parser stack full. This means either a bug "
|
||||
"in the code, or a new command which contains more than "
|
||||
"10 identified tokens.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// TODO move to a common util
|
||||
|
|
|
@ -126,7 +126,7 @@ static void push_string(const char *identifier, const char *str) {
|
|||
fprintf(stderr, "BUG: config_parser stack full. This means either a bug "
|
||||
"in the code, or a new command which contains more than "
|
||||
"10 identified tokens.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static void push_long(const char *identifier, long num) {
|
||||
|
@ -146,7 +146,7 @@ static void push_long(const char *identifier, long num) {
|
|||
fprintf(stderr, "BUG: config_parser stack full. This means either a bug "
|
||||
"in the code, or a new command which contains more than "
|
||||
"10 identified tokens.\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static const char *get_string(const char *identifier) {
|
||||
|
|
|
@ -82,6 +82,6 @@ void fake_outputs_init(const char *output_spec) {
|
|||
|
||||
if (num_screens == 0) {
|
||||
ELOG("No screens found. Please fix your setup. i3 will exit now.\n");
|
||||
exit(0);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -441,7 +441,7 @@ static void handle_screen_change(xcb_generic_event_t *e) {
|
|||
xcb_get_geometry_reply_t *reply = xcb_get_geometry_reply(conn, cookie, NULL);
|
||||
if (reply == NULL) {
|
||||
ELOG("Could not get geometry of the root window, exiting\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
DLOG("root geometry reply: (%d, %d) %d x %d\n", reply->x, reply->y, reply->width, reply->height);
|
||||
|
||||
|
|
|
@ -429,12 +429,12 @@ int main(int argc, char *argv[]) {
|
|||
"\ti3 floating toggle\n"
|
||||
"\ti3 kill window\n"
|
||||
"\n");
|
||||
exit(EXIT_FAILURE);
|
||||
exit(opt == 'h' ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
if (only_check_config) {
|
||||
exit(load_configuration(override_configpath, C_VALIDATE) ? 0 : 1);
|
||||
exit(load_configuration(override_configpath, C_VALIDATE) ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* If the user passes more arguments, we act like i3-msg would: Just send
|
||||
|
|
|
@ -119,7 +119,7 @@ static int sighandler_backtrace(void) {
|
|||
NULL};
|
||||
execvp(args[0], args);
|
||||
DLOG("Failed to exec GDB\n");
|
||||
exit(1);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
int status = 0;
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ void start_application(const char *command, bool no_startup_id) {
|
|||
execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, NULL);
|
||||
/* not reached */
|
||||
}
|
||||
_exit(0);
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
wait(0);
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ void exec_i3_utility(char *name, char *argv[]) {
|
|||
char buffer[BUFSIZ];
|
||||
if (readlink("/proc/self/exe", buffer, BUFSIZ) == -1) {
|
||||
warn("could not read /proc/self/exe");
|
||||
_exit(1);
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
dir = dirname(buffer);
|
||||
sasprintf(&migratepath, "%s/%s", dir, name);
|
||||
|
|
|
@ -84,7 +84,7 @@ static void query_screens(xcb_connection_t *conn) {
|
|||
|
||||
if (num_screens == 0) {
|
||||
ELOG("No screens found. Please fix your setup. i3 will exit now.\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue