This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH GOLD] [6/N mingw host] Add support for not keeping the files open on execute


Hi,
  On mingw, FD_CLOEXEC does not exist but we can use the Win32 APIs to
say we don't want the file to be inherited on execute.

This is the first patch which I could not figure out how to do without
a #ifdef _WIN32.

Built and tested on i686-linux-gnu including with the LTO plugin.

Thanks,
Andrew Pinski

ChangeLog:

* descriptors.cc: Include windows.h on Win32 hosts.
(Descriptors::open): Use SetHandleInformation with HANDLE_FLAG_INHERIT
instead of calling fcntl with FD_CLOEXEC.

Attachment: inherit.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]