mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
alpm: log errors for scriptlets terminated by a signal
Fixes FS#36618. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
ce7456b4cc
commit
3a2a752e1e
@ -599,6 +599,15 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[])
|
|||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("command failed to execute correctly\n"));
|
_alpm_log(handle, ALPM_LOG_ERROR, _("command failed to execute correctly\n"));
|
||||||
retval = 1;
|
retval = 1;
|
||||||
}
|
}
|
||||||
|
} else if(WIFSIGNALED(status) != 0) {
|
||||||
|
char *signal_description = strsignal(WTERMSIG(status));
|
||||||
|
/* strsignal can return NULL on some (non-Linux) platforms */
|
||||||
|
if(signal_description == NULL) {
|
||||||
|
signal_description = _("Unknown signal");
|
||||||
|
}
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR, _("command terminated by signal %d: %s\n"),
|
||||||
|
WTERMSIG(status), signal_description);
|
||||||
|
retval = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user