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 937901 Details for
Bug 1138751
shell hangs if setting variable from command that produces more than 120k and is piped
[?]
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-20140415-hokaido.patch (text/plain), 1.77 KB, created by
Michal Hlavinka
on 2014-09-16 08:05:38 UTC
(
hide
)
Description:
patch to fix this
Filename:
MIME Type:
Creator:
Michal Hlavinka
Created:
2014-09-16 08:05:38 UTC
Size:
1.77 KB
patch
obsolete
>diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido ksh-20120801/src/cmd/ksh93/sh/xec.c >--- ksh-20120801/src/cmd/ksh93/sh/xec.c.hokaido 2014-09-13 09:40:30.275993676 +0200 >+++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2014-09-13 09:51:24.450116987 +0200 >@@ -96,6 +96,39 @@ struct funenv > } > #endif /* !SHOPT_DEVFD */ > >+/* return -1 on error, 0 on fd closed, 1 on fd not using limiting buffer, 2 on fd using limiting buffer, 3 = don't know */ >+static int fdbuftype(fd) >+{return 0; >+ int saveerrno=errno; >+ struct stat fst; >+ >+ if (fstat(fd,&fst)== -1) >+ { >+ if (errno==EBADF) >+ { >+ errno=saveerrno; >+ return 0; >+ } >+ errno=saveerrno; >+ return -1; >+ } >+ >+ errno=saveerrno; >+ >+ switch(fst.st_mode & S_IFMT) >+ { >+ case S_IFCHR: /*character devive*/ >+ case S_IFLNK: /*symlink*/ >+ case S_IFREG: /*regular file*/ >+ return 1; >+ case S_IFSOCK:/*socket*/ >+ case S_IFIFO: /*fifo*/ >+ return 2; >+ default: return 3; >+ } >+} >+ >+ > /* > * The following two functions allow command substituion for non-builtins > * to use a pipe and to wait for the pipe to close before restoring to a >@@ -1633,12 +1666,21 @@ int sh_exec(register const Shnode_t *t, > #endif /* SHOPT_COSHELL */ > if(shp->subshell) > { >+ int comsubsave = shp->comsub; >+ if(comsubsave==1) >+ shp->comsub = 2; > sh_subtmpfile(shp); >+ shp->comsub = comsubsave; >+ /* for comsub==1 workaround pipe buffer limit when such fd is used */ >+ if(shp->comsub==1 && ((!(shp->fdstatus[1]&IONOSEEK)) || fdbuftype(1)==2)) >+ unpipe = iousepipe(shp); >+ > if((type&(FAMP|TFORK))==(FAMP|TFORK)) > { > if(shp->comsub && !(shp->fdstatus[1]&IONOSEEK)) > { >- unpipe = iousepipe(shp); >+ if (!unpipe) >+ unpipe = iousepipe(shp); > sh_subfork(); > } > }
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 1138751
:
937901
|
938046
|
938914