Hey Mister,
with the diff below all tests still pass and a login shell won't
exit on C-c; a subshell does so.
But don't thou ask me if it's correct..
--steffen
diff --git a/histrap.c b/histrap.c
index 3b28f23..3769ea0 100644
--- a/histrap.c
+++ b/histrap.c
@@ -1234,7 +1234,7 @@ runtrap(Trap *p, bool is_last)
exstat = (int)ksh_min(128U + (unsigned)i, 255U);
unwind(LLEAVE);
}
- if (p->flags & TF_DFL_INTR) {
+ if (! Flag(FLOGIN) && p->flags & TF_DFL_INTR) {
/* eg, SIGINT, SIGQUIT, SIGTERM, etc. */
exstat = (int)ksh_min(128U + (unsigned)i, 255U);
unwind(LINTR);