diff --git a/tcsh-6.21.00-000-failing-exit-command-causes-infinite-loop.patch b/tcsh-6.21.00-000-failing-exit-command-causes-infinite-loop.patch new file mode 100644 index 0000000..94419e9 --- /dev/null +++ b/tcsh-6.21.00-000-failing-exit-command-causes-infinite-loop.patch @@ -0,0 +1,42 @@ +diff --git a/sh.c b/sh.c +index 4b5c624..dd87172 100644 +--- a/sh.c ++++ b/sh.c +@@ -237,6 +237,7 @@ main(int argc, char **argv) + int nofile = 0; + volatile int nverbose = 0; + volatile int rdirs = 0; ++ volatile int exitcode = 0; + int quitit = 0; + Char *cp; + #ifdef AUTOLOGOUT +@@ -1390,6 +1391,12 @@ main(int argc, char **argv) + + + if (targinp) { ++ /* If this -c command caused an error before, skip processing */ ++ if (reenter && arginp) { ++ exitcode = 1; ++ goto done; ++ } ++ + arginp = SAVE(targinp); + /* + * we put the command into a variable +@@ -1422,6 +1429,7 @@ main(int argc, char **argv) + */ + process(setintr); + ++done: + /* + * Mop-up. + */ +@@ -1443,7 +1451,7 @@ main(int argc, char **argv) + } + record(); + exitstat(); +- return (0); ++ return exitcode; + } + + void diff --git a/tcsh.spec b/tcsh.spec index c73c78a..64b6705 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -13,7 +13,7 @@ Name: tcsh Summary: An enhanced version of csh, the C shell Version: 6.21.00 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD URL: http://www.tcsh.org/ @@ -42,7 +42,7 @@ BuildRequires: ncurses-devel # Upstream patches -- official upstream patches released by upstream since the # ---------------- last rebase that are necessary for any reason: - +Patch000: tcsh-6.21.00-000-failing-exit-command-causes-infinite-loop.patch # Downstream patches -- these should be always included when doing rebase: # ------------------ @@ -176,6 +176,9 @@ fi # ============================================================================= %changelog +* Fri Oct 25 2019 Jan Macku - 6.21.00-3 +- Added upstream patch to fix infinite loop caused by exit command + * Sat Jul 27 2019 Fedora Release Engineering - 6.21.00-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild