expect/expect-5.45-fd-leak.patch
Petr Šabata c89f70f1b7 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/expect#e13e9cb80d4c0f7031b80814385a34effd4ee7c4
2020-10-15 00:10:59 +02:00

13 lines
532 B
Diff

diff -up expect5.45/exp_clib.c.orig expect5.45/exp_clib.c
--- expect5.45/exp_command.c.orig 2014-09-04 12:12:21.075837835 +0200
+++ expect5.45/exp_command.c 2014-09-04 12:13:39.098593465 +0200
@@ -1161,7 +1161,7 @@ Exp_SpawnObjCmd(
/* if stty finds dev(stderr) != dev(stdout) */
/* save error fd while we're setting up new one */
- errorfd = fcntl(2,F_DUPFD,3);
+ errorfd = fcntl(2,F_DUPFD_CLOEXEC,3);
/* and here is the macro to restore it */
#define restore_error_fd {close(2);fcntl(errorfd,F_DUPFD,2);}