diff options
Diffstat (limited to 'main/expect/12-fdout.patch')
-rw-r--r-- | main/expect/12-fdout.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/main/expect/12-fdout.patch b/main/expect/12-fdout.patch new file mode 100644 index 00000000000..0942819ad1f --- /dev/null +++ b/main/expect/12-fdout.patch @@ -0,0 +1,22 @@ +Author: Ian Jackson <iwj@ubuntu.com> +Description: expBusy forgets to open fdout (Closes: #440818). + +--- a/exp_command.c ++++ b/exp_command.c +@@ -315,7 +315,15 @@ + fcntl(x,F_DUPFD,esPtr->fdin); + close(x); + } +- expCloseOnExec(esPtr->fdin); ++ if (esPtr->fdout != EXP_NOFD && ++ esPtr->fdout != esPtr->fdin) { ++ fcntl(esPtr->fdin,F_DUPFD,esPtr->fdout); ++ } ++ if (esPtr->fdin > 2) ++ expCloseOnExec(esPtr->fdin); ++ if (esPtr->fdout != EXP_NOFD && ++ esPtr->fdout > 2) ++ expCloseOnExec(esPtr->fdout); + esPtr->fdBusy = TRUE; + } + |