mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-06 11:34:13 +02:00
22 lines
544 B
Diff
22 lines
544 B
Diff
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;
|
|
}
|
|
|