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 918457 Details for
Bug 1117316
wrong return code from a pipe in command substitution
[?]
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]
patch to fix this
ksh-20120801-crash.patch (text/plain), 2.45 KB, created by
Michal Hlavinka
on 2014-07-16 15:45:54 UTC
(
hide
)
Description:
patch to fix this
Filename:
MIME Type:
Creator:
Michal Hlavinka
Created:
2014-07-16 15:45:54 UTC
Size:
2.45 KB
patch
obsolete
>diff -up ksh-20120801/src/cmd/ksh93/include/jobs.h.crash ksh-20120801/src/cmd/ksh93/include/jobs.h >--- ksh-20120801/src/cmd/ksh93/include/jobs.h.crash 2014-07-16 17:32:03.570057304 +0200 >+++ ksh-20120801/src/cmd/ksh93/include/jobs.h 2014-07-16 17:32:03.600057172 +0200 >@@ -118,6 +118,7 @@ struct jobs > char jobcontrol; /* turned on for real job control */ > char waitsafe; /* wait will not block */ > char waitall; /* wait for all jobs in pipe */ >+ char hack1_waitall; > char toclear; /* job table needs clearing */ > unsigned char *freejobs; /* free jobs numbers */ > #if SHOPT_COSHELL >diff -up ksh-20120801/src/cmd/ksh93/sh/jobs.c.crash ksh-20120801/src/cmd/ksh93/sh/jobs.c >--- ksh-20120801/src/cmd/ksh93/sh/jobs.c.crash 2014-07-16 17:32:03.554057375 +0200 >+++ ksh-20120801/src/cmd/ksh93/sh/jobs.c 2014-07-16 17:32:03.600057172 +0200 >@@ -1957,6 +1957,7 @@ again: > { > count = bp->count; > jp = bp->list; >+ jpold = 0; > goto again; > } > if(jp) >diff -up ksh-20120801/src/cmd/ksh93/sh/subshell.c.crash ksh-20120801/src/cmd/ksh93/sh/subshell.c >--- ksh-20120801/src/cmd/ksh93/sh/subshell.c.crash 2014-07-16 17:32:03.593057203 +0200 >+++ ksh-20120801/src/cmd/ksh93/sh/subshell.c 2014-07-16 17:32:03.600057172 +0200 >@@ -492,6 +492,7 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_ > struct sh_scoped savst; > struct dolnod *argsav=0; > int argcnt; >+ int pipefail = 0; > memset((char*)sp, 0, sizeof(*sp)); > sfsync(shp->outpool); > sh_sigcheck(shp); >@@ -541,7 +542,10 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_ > sp->comsub = shp->comsub; > shp->subshare = comsub==2 || (comsub==1 && sh_isoption(SH_SUBSHARE)); > if(comsub) >+ { > shp->comsub = comsub; >+ job.hack1_waitall=(comsub==1); >+ } > sp->shpwdfd=-1; > if(!comsub || !shp->subshare) > { >@@ -648,6 +652,7 @@ Sfio_t *sh_subshell(Shell_t *shp,Shnode_ > } > else > { >+ job.hack1_waitall=0; > /* move tmp file to iop and restore sfstdout */ > iop = sfswap(sfstdout,NIL(Sfio_t*)); > if(!iop) >diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.crash ksh-20120801/src/cmd/ksh93/sh/xec.c >--- ksh-20120801/src/cmd/ksh93/sh/xec.c.crash 2014-07-16 17:32:03.587057230 +0200 >+++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2014-07-16 17:32:03.601057168 +0200 >@@ -2125,7 +2125,7 @@ int sh_exec(register const Shnode_t *t, > memset(exitval,0,job.waitall*sizeof(int)); > } > else >- job.waitall |= !pipejob && sh_isstate(SH_MONITOR); >+ job.waitall |= job.hack1_waitall || !pipejob && sh_isstate(SH_MONITOR); > job_lock(); > nlock++; > do
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 1117316
:
916378
| 918457