1
Author: Ian Jackson <iwj@ubuntu.com>
2
Description: expBusy forgets to open fdout (Closes: #440818).
4
diff -Naurp expect.orig/exp_command.c expect/exp_command.c
5
--- expect.orig/exp_command.c 2009-08-03 06:58:30.000000000 +0000
6
+++ expect/exp_command.c 2009-08-03 08:37:47.000000000 +0000
7
@@ -310,7 +310,15 @@ expBusy(esPtr)
8
fcntl(x,F_DUPFD,esPtr->fdin);
11
- expCloseOnExec(esPtr->fdin);
12
+ if (esPtr->fdout != EXP_NOFD &&
13
+ esPtr->fdout != esPtr->fdin) {
14
+ fcntl(esPtr->fdin,F_DUPFD,esPtr->fdout);
16
+ if (esPtr->fdin > 2)
17
+ expCloseOnExec(esPtr->fdin);
18
+ if (esPtr->fdout != EXP_NOFD &&
20
+ expCloseOnExec(esPtr->fdout);