From 352e68dabd5e2fe6bee23e688f11d43fb0d9bf16 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 25 Sep 2020 23:26:25 +0200 Subject: [PATCH] do not resend signal on termination (rhbz#1075635) public bug: https://bugzilla.redhat.com/1075635 patched by: https://src.fedoraproject.org/rpms/ksh/blob/642af4d6/f/ksh-20120801-sufix.patch src/cmd/ksh93/sh/io.c: io_prompt(): - Reset the currently running command's exit status (exitval) when writing the prompt. This does not affect "$?" which is savexit. --- src/cmd/ksh93/sh/io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/ksh93/sh/io.c b/src/cmd/ksh93/sh/io.c index b2346a49ce0c..63e2af26ddfb 100644 --- a/src/cmd/ksh93/sh/io.c +++ b/src/cmd/ksh93/sh/io.c @@ -2096,6 +2096,7 @@ static int io_prompt(Shell_t *shp,Sfio_t *iop,register int flag) } #endif /* TIOCLBIC */ cp = sh_mactry(shp,nv_getval(sh_scoped(shp,PS1NOD))); + shp->exitval = 0; for(;c= *cp;cp++) { if(c==HIST_CHAR)