[BusyBox 0001336]: [BUG] msh: wrong handling of backticks if stdout is closed in shell
bugs at busybox.net
bugs at busybox.net
Wed May 9 15:16:32 PDT 2007
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=1336
======================================================================
Reported By: landau
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1336
Category: Other
Reproducibility: always
Severity: major
Priority: normal
Status: closed
Resolution: open
Fixed in Version:
======================================================================
Date Submitted: 05-07-2007 00:09 PDT
Last Modified: 05-09-2007 15:16 PDT
======================================================================
Summary: [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.
======================================================================
----------------------------------------------------------------------
vda - 05-09-07 15:16
----------------------------------------------------------------------
Fixed in revision 18597, thanks!
Issue History
Date Modified Username Field Change
======================================================================
05-07-07 00:09 landau New Issue
05-07-07 00:09 landau Status new => assigned
05-07-07 00:09 landau Assigned To => BusyBox
05-07-07 00:09 landau File Added: msh.diff
05-09-07 15:16 vda Status assigned => closed
05-09-07 15:16 vda Note Added: 0002352
======================================================================
More information about the busybox-cvs
mailing list