Fix tcsh obeys printexitvalue for back-ticks
This commit is contained in:
parent
3bbb34859d
commit
7cc421e822
82
tcsh-6.17.00-printexitvalue.patch
Normal file
82
tcsh-6.17.00-printexitvalue.patch
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
diff -up tcsh-6.17.00/sh.glob.c_old tcsh-6.17.00/sh.glob.c
|
||||||
|
--- tcsh-6.17.00/sh.glob.c_old 2009-12-15 12:38:48.000000000 +0100
|
||||||
|
+++ tcsh-6.17.00/sh.glob.c 2009-12-15 12:40:52.000000000 +0100
|
||||||
|
@@ -882,6 +882,10 @@ backeval(struct blk_buf *bb, struct Strb
|
||||||
|
alias(¶ml);
|
||||||
|
t = syntax(paraml.next, ¶ml, 0);
|
||||||
|
cleanup_push(t, syntax_cleanup);
|
||||||
|
+ /* The F_BACKQ flag must set so the job output is correct if
|
||||||
|
+ * printexitvalue is set. If it's not set, the job output
|
||||||
|
+ * will have "Exit N" appended where N is the exit status. */
|
||||||
|
+ t->t_dflg = F_BACKQ;
|
||||||
|
if (seterr)
|
||||||
|
stderror(ERR_OLD);
|
||||||
|
#ifdef SIGTSTP
|
||||||
|
diff -up tcsh-6.17.00/sh.sem.c_old tcsh-6.17.00/sh.sem.c
|
||||||
|
--- tcsh-6.17.00/sh.sem.c_old 2009-12-15 12:41:03.000000000 +0100
|
||||||
|
+++ tcsh-6.17.00/sh.sem.c 2009-12-15 12:57:49.000000000 +0100
|
||||||
|
@@ -664,31 +664,31 @@ execute(struct command *t, volatile int
|
||||||
|
#endif /* !CLOSE_ON_EXEC */
|
||||||
|
didfds = 0;
|
||||||
|
wanttty = -1;
|
||||||
|
- t->t_dspr->t_dflg |= t->t_dflg & F_NOINTERRUPT;
|
||||||
|
+ t->t_dspr->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ);
|
||||||
|
execute(t->t_dspr, wanttty, NULL, NULL, do_glob);
|
||||||
|
exitstat();
|
||||||
|
|
||||||
|
case NODE_PIPE:
|
||||||
|
#ifdef BACKPIPE
|
||||||
|
t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg &
|
||||||
|
- (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT));
|
||||||
|
+ (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT | F_BACKQ));
|
||||||
|
execute(t->t_dcdr, wanttty, pv, pipeout, do_glob);
|
||||||
|
t->t_dcar->t_dflg |= F_PIPEOUT |
|
||||||
|
- (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT));
|
||||||
|
+ (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT | F_BACKQ));
|
||||||
|
execute(t->t_dcar, wanttty, pipein, pv, do_glob);
|
||||||
|
#else /* !BACKPIPE */
|
||||||
|
t->t_dcar->t_dflg |= F_PIPEOUT |
|
||||||
|
- (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT));
|
||||||
|
+ (t->t_dflg & (F_PIPEIN | F_AMPERSAND | F_STDERR | F_NOINTERRUPT | F_BACKQ));
|
||||||
|
execute(t->t_dcar, wanttty, pipein, pv, do_glob);
|
||||||
|
t->t_dcdr->t_dflg |= F_PIPEIN | (t->t_dflg &
|
||||||
|
- (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT));
|
||||||
|
+ (F_PIPEOUT | F_AMPERSAND | F_NOFORK | F_NOINTERRUPT | F_BACKQ));
|
||||||
|
execute(t->t_dcdr, wanttty, pv, pipeout, do_glob);
|
||||||
|
#endif /* BACKPIPE */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NODE_LIST:
|
||||||
|
if (t->t_dcar) {
|
||||||
|
- t->t_dcar->t_dflg |= t->t_dflg & F_NOINTERRUPT;
|
||||||
|
+ t->t_dcar->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ);
|
||||||
|
execute(t->t_dcar, wanttty, NULL, NULL, do_glob);
|
||||||
|
/*
|
||||||
|
* In strange case of A&B make a new job after A
|
||||||
|
@@ -699,7 +699,7 @@ execute(struct command *t, volatile int
|
||||||
|
}
|
||||||
|
if (t->t_dcdr) {
|
||||||
|
t->t_dcdr->t_dflg |= t->t_dflg &
|
||||||
|
- (F_NOFORK | F_NOINTERRUPT);
|
||||||
|
+ (F_NOFORK | F_NOINTERRUPT | F_BACKQ);
|
||||||
|
execute(t->t_dcdr, wanttty, NULL, NULL, do_glob);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
@@ -707,7 +707,7 @@ execute(struct command *t, volatile int
|
||||||
|
case NODE_OR:
|
||||||
|
case NODE_AND:
|
||||||
|
if (t->t_dcar) {
|
||||||
|
- t->t_dcar->t_dflg |= t->t_dflg & F_NOINTERRUPT;
|
||||||
|
+ t->t_dcar->t_dflg |= t->t_dflg & (F_NOINTERRUPT | F_BACKQ);
|
||||||
|
execute(t->t_dcar, wanttty, NULL, NULL, do_glob);
|
||||||
|
if ((getn(varval(STRstatus)) == 0) !=
|
||||||
|
(t->t_dtyp == NODE_AND)) {
|
||||||
|
@@ -716,7 +716,7 @@ execute(struct command *t, volatile int
|
||||||
|
}
|
||||||
|
if (t->t_dcdr) {
|
||||||
|
t->t_dcdr->t_dflg |= t->t_dflg &
|
||||||
|
- (F_NOFORK | F_NOINTERRUPT);
|
||||||
|
+ (F_NOFORK | F_NOINTERRUPT | F_BACKQ);
|
||||||
|
execute(t->t_dcdr, wanttty, NULL, NULL, do_glob);
|
||||||
|
}
|
||||||
|
break;
|
@ -3,7 +3,7 @@
|
|||||||
Summary: An enhanced version of csh, the C shell
|
Summary: An enhanced version of csh, the C shell
|
||||||
Name: tcsh
|
Name: tcsh
|
||||||
Version: 6.17
|
Version: 6.17
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.00.tar.gz
|
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.00.tar.gz
|
||||||
@ -23,6 +23,8 @@ Patch13: tcsh-6.17.00-mh-color.patch
|
|||||||
Patch14: tcsh-6.17.00-glob-automount.patch
|
Patch14: tcsh-6.17.00-glob-automount.patch
|
||||||
# Accepted by upstream:
|
# Accepted by upstream:
|
||||||
Patch15: tcsh-6.17.00-history.patch
|
Patch15: tcsh-6.17.00-history.patch
|
||||||
|
# Accepted by upstream:
|
||||||
|
Patch16: tcsh-6.17.00-printexitvalue.patch
|
||||||
Provides: csh = %{version}
|
Provides: csh = %{version}
|
||||||
Requires(post): grep
|
Requires(post): grep
|
||||||
Requires(postun): coreutils, grep
|
Requires(postun): coreutils, grep
|
||||||
@ -53,6 +55,7 @@ like syntax.
|
|||||||
%patch13 -p1 -b .mh-color
|
%patch13 -p1 -b .mh-color
|
||||||
%patch14 -p1 -b .glob-automount
|
%patch14 -p1 -b .glob-automount
|
||||||
%patch15 -p1 -b .history
|
%patch15 -p1 -b .history
|
||||||
|
%patch16 -p1 -b .printexitvalue
|
||||||
|
|
||||||
for i in Fixes WishList; do
|
for i in Fixes WishList; do
|
||||||
iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
|
iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
|
||||||
@ -126,6 +129,9 @@ fi
|
|||||||
%{_mandir}/man1/*.1*
|
%{_mandir}/man1/*.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 15 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.17-6
|
||||||
|
- Fix tcsh obeys printexitvalue for back-ticks
|
||||||
|
|
||||||
* Wed Nov 4 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.17-5
|
* Wed Nov 4 2009 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.17-5
|
||||||
- Fix few globbing problems
|
- Fix few globbing problems
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user