Anonymous | Login | Signup for a new account | 11-10-2008 11:14 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001336 | [BusyBox] Other | major | always | 05-07-07 00:09 | 05-09-07 15:16 | ||||
Reporter | landau | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | svn | ||||||
Summary | 0001336: [BUG] msh: wrong handling of backticks if stdout is closed in shell | ||||||||
Description |
When running a script like "files=`ls`", when the script's file descriptor 1 is closed, the command is executed, but its output is discarded and the files variable stays empty. What happens is that the pipe msh creates gets fd 1, and then msh dups it to 1 (a no-op in this case), and closes the pipe (which is 1) without checking. The patch, instead of thoughtlessly closing pipefd[0] and pipefd[1] checks whether any of them is 1 and does not close in this case. Patch applies to trunk rev 18581. |
||||||||
Additional Information | |||||||||
Attached Files | msh.diff [^] (381 bytes) 05-07-07 00:09 | ||||||||
|
Copyright © 2000 - 2006 Mantis Group |