Menu

#23 [PATCH] fix fd leak

None
closed-accepted
nobody
None
5
2020-05-31
2020-05-27
No

Hi,

During the gcc testsuite, I've found that a fd leak is occuring. I don't have a minimal test case but with this patch the fd leak disappeares .
This patch is inspired by the Fedora one available in their last RPM of expect. But some OSes like AIX don't have F_DUPFD_CLOEXEC flag. This one should work on all the OSes which have at least FD_CLOEXEC flag.

1 Attachments

Discussion

  • Clément Chigot

    Clément Chigot - 2020-05-28

    There is a mistake in the previous version... This one should be better.

     
    • Nils Carlson

      Nils Carlson - 2020-05-30

      In principle it looks good - except why do you use '#elsepu' and not '#else'?

       
  • Nils Carlson

    Nils Carlson - 2020-05-31

    Applied the second one - but changed the #elsepu to #else.

    Thank you.

     
  • Nils Carlson

    Nils Carlson - 2020-05-31
    • status: open --> closed-accepted
    • Group: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.