Fix for failing exit command causes inginite loop
Added upstream patch: tcsh-6.21.00-000-failing-exit-command-causes-infinite-loop.patch
This commit is contained in:
parent
2563b0440b
commit
0e2d31e279
@ -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
|
@ -13,7 +13,7 @@
|
|||||||
Name: tcsh
|
Name: tcsh
|
||||||
Summary: An enhanced version of csh, the C shell
|
Summary: An enhanced version of csh, the C shell
|
||||||
Version: 6.21.00
|
Version: 6.21.00
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
|
|
||||||
URL: http://www.tcsh.org/
|
URL: http://www.tcsh.org/
|
||||||
@ -42,7 +42,7 @@ BuildRequires: ncurses-devel
|
|||||||
|
|
||||||
# Upstream patches -- official upstream patches released by upstream since the
|
# Upstream patches -- official upstream patches released by upstream since the
|
||||||
# ---------------- last rebase that are necessary for any reason:
|
# ---------------- 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:
|
# Downstream patches -- these should be always included when doing rebase:
|
||||||
# ------------------
|
# ------------------
|
||||||
@ -176,6 +176,9 @@ fi
|
|||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 25 2019 Jan Macku <jamacku@redhat.com> - 6.21.00-3
|
||||||
|
- Added upstream patch to fix infinite loop caused by exit command
|
||||||
|
|
||||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.21.00-2
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.21.00-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user