Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 921770 Details for
Bug 1123854
Tcsh does not support upstream's $anyerror variable
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Reintroduce $anyerror as is done in upstream
tcsh-6.18.02-posix-exit-status-value.patch (text/plain), 3.17 KB, created by
Pavel Raiskup
on 2014-07-28 14:14:45 UTC
(
hide
)
Description:
Reintroduce $anyerror as is done in upstream
Filename:
MIME Type:
Creator:
Pavel Raiskup
Created:
2014-07-28 14:14:45 UTC
Size:
3.17 KB
patch
obsolete
>From f86082e548082ec2c3cac8920cd39dd2da0b70c4 Mon Sep 17 00:00:00 2001 >From: Pavel Raiskup <praiskup@redhat.com> >Date: Mon, 28 Jul 2014 14:47:33 +0200 >Subject: [PATCH] implement variable tcsh_posix_status > >So from now, if "!defined(anyerror) || defined(tcsh_posix_status)", tcsh >behaves, with regards to pipelines, same way as POSIX-like shells. > >Related: #759132, #1025703, #1123854 > >--- > sh.c | 2 ++ > sh.h | 1 + > sh.proc.c | 2 +- > sh.set.c | 5 +++++ > tc.const.c | 2 ++ > 5 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/sh.c b/sh.c >index 518d610..3d627b1 100644 >--- a/sh.c >+++ b/sh.c >@@ -353,6 +353,8 @@ main(int argc, char **argv) > anyerror = 1; /* for compatibility */ > setcopy(STRanyerror, STRNULL, VAR_READWRITE); > >+ tcsh_posix_status = 0; >+ > /* Default history size to 100 */ > setcopy(STRhistory, str2short("100"), VAR_READWRITE); > sethistory(100); >diff --git a/sh.h b/sh.h >index 503da25..6281260 100644 >--- a/sh.h >+++ b/sh.h >@@ -563,6 +563,7 @@ EXTERN int editing IZERO; /* doing filename expansion and line editing */ > EXTERN int noediting IZERO; /* initial $term defaulted to noedit */ > EXTERN int bslash_quote IZERO;/* PWP: tcsh-style quoting? (in sh.c) */ > EXTERN int anyerror IZERO; /* propagate errors from pipelines/backq */ >+EXTERN int tcsh_posix_status IZERO; /* negation for anyerror */ > EXTERN int compat_expr IZERO;/* csh-style expressions? */ > EXTERN int isoutatty IZERO; /* is SHOUT a tty */ > EXTERN int isdiagatty IZERO;/* is SHDIAG a tty */ >diff --git a/sh.proc.c b/sh.proc.c >index afcf0b9..3c565f2 100644 >--- a/sh.proc.c >+++ b/sh.proc.c >@@ -561,7 +561,7 @@ pjwait(struct process *pp) > do { > /* In case of pipelines only the result of the last > * command should be taken in account */ >- if (!anyerror && !(fp->p_flags & PBRACE) >+ if ((!anyerror || tcsh_posix_status) && !(fp->p_flags & PBRACE) > && ((fp->p_flags & PPOU) || (fp->p_flags & PBACKQ))) > continue; > if (fp->p_reason) >diff --git a/sh.set.c b/sh.set.c >index b2c44b1..ceff8cf 100644 >--- a/sh.set.c >+++ b/sh.set.c >@@ -109,6 +109,9 @@ update_vars(Char *vp) > else if (eq(vp, STRanyerror)) { > anyerror = 1; > } >+ else if (eq(vp, STRtcsh_posix_status)) { >+ tcsh_posix_status = 1; >+ } > else if (eq(vp, STRsymlinks)) { > Char *pn = varval(vp); > >@@ -771,6 +774,8 @@ unset(Char **v, struct command *c) > loginsh = 0; > if (adrof(STRanyerror) == 0) > anyerror = 0; >+ if (adrof(STRtcsh_posix_status) == 0) >+ tcsh_posix_status = 0; > if (adrof(STRwordchars) == 0) > word_chars = STR_WORD_CHARS; > if (adrof(STRedit) == 0) >diff --git a/tc.const.c b/tc.const.c >index e49f05a..88b1d69 100644 >--- a/tc.const.c >+++ b/tc.const.c >@@ -44,6 +44,8 @@ Char STRrootdefautologout[] = { '1', '5', '\0' }; > Char STRautomatic[] = { 'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', > '\0' }; > Char STRanyerror[] = { 'a', 'n', 'y', 'e', 'r', 'r', 'o', 'r', '\0' }; >+Char STRtcsh_posix_status[] = {'t', 'c', 's', 'h', '_', 'p', 'o', 's', 'i', 'x', >+ '_', 's', 't', 'a', 't', 'u', 's', '\0' }; > Char STRhangup[] = { 'h', 'a', 'n', 'g', 'u', 'p', '\0' }; > Char STRaout[] = { 'a', '.', 'o', 'u', 't', '\0' }; > Char STRtty[] = { 't', 't', 'y', '\0' }; >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1123854
: 921770 |
1050655