signal to itself so the parent shell knows the command died from
a signal. However, we don't want sudo itself to dump core.
sudo_fatalx(U_("unexpected sudo mode 0x%x"), sudo_mode);
}
+ /*
+ * If the command was terminated by a signal, sudo needs to terminated
+ * the same way. Otherwise, the shell may ignore a keyboard-generated
+ * signal. However, we want to avoid having sudo dump core itself.
+ */
if (WIFSIGNALED(status)) {
sigaction_t sa;
+ if (WCOREDUMP(status))
+ disable_coredumps();
+
memset(&sa, 0, sizeof(sa));
sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_DFL;