--- /dev/null
+@@
+@@
+- exit(0);
++ exit(EXIT_SUCCESS);
+@@
+@@
+- _exit(0);
++ _exit(EXIT_SUCCESS);
+@@
+@@
+- exit(1);
++ exit(EXIT_FAILURE);
+@@
+@@
+- _exit(1);
++ _exit(EXIT_FAILURE);
execv(SYSTEMCTL_BINARY_PATH, argv);
log_error_errno(errno, "Failed to exec " SYSTEMCTL_BINARY_PATH ": %m");
- exit(1);
+ exit(EXIT_FAILURE);
#endif
}
* CAP_SYS_BOOT just exit, this will kill our
* container for good. */
log_info("Exiting container.");
- exit(0);
+ exit(EXIT_SUCCESS);
}
r = log_error_errno(errno, "Failed to invoke reboot(): %m");
if (r == 0) {
execlp("gdb", "gdb", exe, path, NULL);
log_error_errno(errno, "Failed to invoke gdb: %m");
- _exit(1);
+ _exit(EXIT_FAILURE);
}
r = wait_for_terminate(pid, &st);
break;
}
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
CPU_ZERO(&cpuset);
assert_se(pid >= 0);
if (pid == 0)
- _exit(0);
+ _exit(EXIT_SUCCESS);
assert_se(sd_event_add_child(sd_event_source_get_event(s), &p, pid, WEXITED, child_handler, INT_TO_PTR('f')) >= 0);
assert_se(sd_event_source_set_enabled(p, SD_EVENT_ONESHOT) >= 0);
/* Child */
execv(cmdline[0], (char**) cmdline);
- _exit(1); /* Operational error */
+ _exit(EXIT_FAILURE); /* Operational error */
}
r = wait_for_terminate_and_warn("quotacheck", pid, true);
if (env) {
if (access(env, F_OK) < 0) {
fputs("ERROR: $SYSTEMD_TEST_DATA directory does not exist\n", stderr);
- exit(1);
+ exit(EXIT_FAILURE);
}
strncpy(testdir, env, sizeof(testdir) - 1);
} else {
/* test this without the suffix, as it may contain a glob */
if (access(testdir, F_OK) < 0) {
fputs("ERROR: Cannot find testdata directory, set $SYSTEMD_TEST_DATA\n", stderr);
- exit(1);
+ exit(EXIT_FAILURE);
}
}
assert_se(pid >= 0);
if (pid == 0) {
test_func();
- exit(0);
+ exit(EXIT_SUCCESS);
} else if (pid > 0) {
int status;
line = mfree(line);
safe_close(fd);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
static void test_rename_process_now(const char *p, int ret) {
c = getpid();
assert_se(a == b && a == c);
- _exit(0);
+ _exit(EXIT_SUCCESS);
}
d = raw_getpid();
printf("MTD_FTL=smartmedia\n");
free(cis_buffer);
- exit(0);
+ exit(EXIT_SUCCESS);
exit:
free(cis_buffer);
return;
case 'h':
help();
- exit(0);
+ exit(EXIT_SUCCESS);
case 'p':
if (streq(optarg, "0x80"))
case 'V':
printf("%s\n", PACKAGE_VERSION);
- exit(0);
+ exit(EXIT_SUCCESS);
case 'x':
export = true;
* Get command line options (overriding any config file settings).
*/
if (set_options(udev, argc, argv, maj_min_dev) < 0)
- exit(1);
+ exit(EXIT_FAILURE);
if (!dev_specified) {
log_error("No device specified.");