* [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too
@ 2009-05-27 13:04 Kai Tietz
2009-05-27 13:13 ` Kai Tietz
0 siblings, 1 reply; 5+ messages in thread
From: Kai Tietz @ 2009-05-27 13:04 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 439 bytes --]
Hello
This patch ensures, that the file descriptor has set inherit to false for
read open, too.
ChangeLog
2009-05-27 Kai Tietz <kai.tietz@onevision.com>
* pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
Tested for i686-pc-cygwin, i386-pc-mingw32, and for x86_64-pc-mingw32. Ok
for apply?
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
[-- Attachment #2: pex_w32_inherit.diff --]
[-- Type: application/octet-stream, Size: 568 bytes --]
Index: src/libiberty/pex-win32.c
===================================================================
--- src.orig/libiberty/pex-win32.c 2009-05-27 14:57:03.000000000 +0200
+++ src/libiberty/pex-win32.c 2009-05-27 14:35:26.726887900 +0200
@@ -915,6 +915,11 @@
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");
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too
2009-05-27 13:04 [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too Kai Tietz
@ 2009-05-27 13:13 ` Kai Tietz
2009-05-29 20:12 ` DJ Delorie
0 siblings, 1 reply; 5+ messages in thread
From: Kai Tietz @ 2009-05-27 13:13 UTC (permalink / raw)
To: GCC Patches, binutils
gcc-patches-owner@gcc.gnu.org wrote on 27.05.2009 15:03:39:
> Hello
>
> This patch ensures, that the file descriptor has set inherit to false
for
> read open, too.
>
> ChangeLog
>
> 2009-05-27 Kai Tietz <kai.tietz@onevision.com>
>
> * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
>
> Tested for i686-pc-cygwin, i386-pc-mingw32, and for x86_64-pc-mingw32.
Ok
> for apply?
>
> Kai
>
> | (\_/) This is Bunny. Copy and paste Bunny
> | (='.'=) into your signature to help him gain
> | (")_(") world domination.
> [attachment "pex_w32_inherit.diff" deleted by Kai Tietz/Onevision]
Missed to add binutils, too.
Kai
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too
2009-05-27 13:13 ` Kai Tietz
@ 2009-05-29 20:12 ` DJ Delorie
2009-05-29 20:19 ` Kai Tietz
0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2009-05-29 20:12 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches, binutils
> > 2009-05-27 Kai Tietz <kai.tietz@onevision.com>
> >
> > * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
Kai, you're a windows/cygwin/mingw maintainer. You don't need our
approval to fix bugs in files specific to your targets.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too
2009-05-29 20:12 ` DJ Delorie
@ 2009-05-29 20:19 ` Kai Tietz
2009-05-30 1:07 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Kai Tietz @ 2009-05-29 20:19 UTC (permalink / raw)
To: DJ Delorie; +Cc: Kai Tietz, gcc-patches, binutils
2009/5/29 DJ Delorie <dj@redhat.com>:
>
>> > 2009-05-27 Kai Tietz <kai.tietz@onevision.com>
>> >
>> > * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
>
> Kai, you're a windows/cygwin/mingw maintainer. You don't need our
> approval to fix bugs in files specific to your targets.
>
Thanks for clarification. I assumed - as libiberty is under separate
maintainer-ship - an approval is still necessary.
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too
2009-05-29 20:19 ` Kai Tietz
@ 2009-05-30 1:07 ` Ian Lance Taylor
0 siblings, 0 replies; 5+ messages in thread
From: Ian Lance Taylor @ 2009-05-30 1:07 UTC (permalink / raw)
To: Kai Tietz; +Cc: DJ Delorie, Kai Tietz, gcc-patches, binutils
Kai Tietz <ktietz70@googlemail.com> writes:
> 2009/5/29 DJ Delorie <dj@redhat.com>:
>>
>>> > 2009-05-27 Kai Tietz <kai.tietz@onevision.com>
>>> >
>>> > * pex-win32.c (pex_win32_fdopenr): Set INHERIT to false.
>>
>> Kai, you're a windows/cygwin/mingw maintainer. You don't need our
>> approval to fix bugs in files specific to your targets.
>>
>
> Thanks for clarification. I assumed - as libiberty is under separate
> maintainer-ship - an approval is still necessary.
I think we can reasonably describe pex-win32.c as a Windows specific
file. Note that DJ is a libiberty maintainer (as am I), so his
deferring to you implies approval.
Ian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-30 1:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-27 13:04 [patch libiberty]: pex-win32 make sure that read handle has no inherit flag set, too Kai Tietz
2009-05-27 13:13 ` Kai Tietz
2009-05-29 20:12 ` DJ Delorie
2009-05-29 20:19 ` Kai Tietz
2009-05-30 1:07 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).