pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.

2009-05-29  Kai Tietz  <kai.tietz@onevision.com>

        * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.

From-SVN: r147984
This commit is contained in:
Kai Tietz 2009-05-29 20:20:40 +00:00 committed by Kai Tietz
parent 7a2faca1c5
commit bb870b58e2
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-05-29 Kai Tietz <kai.tietz@onevision.com>
* pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
2009-05-29 Michael Matz <matz@suse.de>
* fibheap.c (fibheap_replace_key_data): Make sure we don't early

View File

@ -915,6 +915,11 @@ static FILE *
pex_win32_fdopenr (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd,
int binary)
{
HANDLE h = (HANDLE) _get_osfhandle (fd);
if (h == INVALID_HANDLE_VALUE)
return NULL;
if (! SetHandleInformation (h, HANDLE_FLAG_INHERIT, 0))
return NULL;
return fdopen (fd, binary ? "rb" : "r");
}