args[i++] = NULL;
pid = fork();
- if (pid < 0) {
- log_error("Failed to fork: %m");
- return -errno;
- } else if (pid == 0) {
+ if (pid < 0)
+ return log_error_errno(errno, "Failed to fork: %m");
+ else if (pid == 0) {
execv(args[0], (char **) args);
_exit(EXIT_FAILURE);
}
args[i++] = NULL;
pid = fork();
- if (pid < 0) {
- log_error("Failed to fork: %m");
- return -errno;
- } else if (pid == 0) {
+ if (pid < 0)
+ return log_error_errno(errno, "Failed to fork: %m");
+ else if (pid == 0) {
execv(args[0], (char **) args);
_exit(EXIT_FAILURE);
}
fd = open_terminal(vc, O_RDWR|O_CLOEXEC);
if (fd < 0) {
- log_error("Failed to open %s: %m", vc);
+ log_error_errno(errno, "Failed to open %s: %m", vc);
return EXIT_FAILURE;
}
}
if (font_pid > 0)
- wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
+ wait_for_terminate_and_warn(KBD_SETFONT, font_pid, true);
r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
if (r < 0) {
}
if (keymap_pid > 0)
- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
+ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid, true);
/* Only copy the font when we started setfont successfully */
if (font_copy && font_pid > 0)