From e50b2640d655e3e195c9f7ed8b93d0992e4143de Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 13:15:24 +0000 Subject: Apply patch expect-5.45-fd-leak.patch patch_name: expect-5.45-fd-leak.patch present_in_specfile: true --- diff --git a/exp_command.c b/exp_command.c index b554b18..c055ffd 100644 --- a/exp_command.c +++ b/exp_command.c @@ -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);}