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 931003 Details for
Bug 1133582
broken command substitution while stdout closed
[?]
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-20130613-cdfix4.patch (text/plain), 1.59 KB, created by
Michal Hlavinka
on 2014-08-26 13:51:59 UTC
(
hide
)
Description:
patch to fix this
Filename:
MIME Type:
Creator:
Michal Hlavinka
Created:
2014-08-26 13:51:59 UTC
Size:
1.59 KB
patch
obsolete
>diff -up ksh-20130613/src/cmd/ksh93/bltins/cd_pwd.c.cdfix4 ksh-20130613/src/cmd/ksh93/bltins/cd_pwd.c >--- ksh-20130613/src/cmd/ksh93/bltins/cd_pwd.c.cdfix4 2014-08-26 14:20:53.545252307 +0200 >+++ ksh-20130613/src/cmd/ksh93/bltins/cd_pwd.c 2014-08-26 14:40:04.921353505 +0200 >@@ -153,14 +153,61 @@ int sh_diropenat(Shell_t *shp, int dir, > return -1; > } > >- /* Move fd to a number > 10 and *register* the fd number with the shell */ >- shfd = sh_fcntl(fd, F_dupfd_cloexec, 10); >+ /* Move fd to a number > 10 and register the fd number with the shell */ >+ shfd = fcntl(fd, F_dupfd_cloexec, 10); > savederrno=errno; >- sh_close(fd); >+ close(fd); > errno=savederrno; > return(shfd); > } > >+/* >+ * check for /dev/fd/nn or /proc/pid/fd/nn and return relative path >+ */ >+static char *reldirNOTUSED(char *dir, int *fd, pid_t *pidp) >+{ >+ char *cp=0; >+ pid_t pid=0; >+ int n = strlen(dir); >+ if(n < 10) >+ return(dir); >+ if(memcmp(dir,"/dev/fd/",8)==0) >+ *fd = strtol(dir+8,&cp,10); >+ else if(memcmp(dir,"/proc/",6)==0) >+ { >+ if(memcmp(dir+6,"self",4)==0) >+ cp = dir+10; >+ else if ((pid = (pid_t)strtol(dir+6,&cp,10))==0 || *cp!='/') >+ return(dir); >+ if(memcmp(cp,"/fd/",4)==0) >+ { >+ if(pidp && pid && pid!=getpid()) >+ { >+ int c = *cp; >+ *cp = 0; >+ *fd = open(dir,O_RDONLY); >+ *cp = c; >+ } >+ else >+ { >+ pid = 0; >+ *fd = strtol(cp+4,&cp,10); >+ } >+ } >+ } >+ if(!cp) >+ return(dir); >+ if(*cp=='/' || *cp==0) >+ { >+ while(*cp=='/') >+ cp++; >+ dir = *cp?cp:(char*)e_dot; >+ } >+ if(pidp) >+ *pidp = pid; >+ return(dir); >+} >+ > int b_cd(int argc, char *argv[],Shbltin_t *context) > { > register char *dir;
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 1133582
: 931003