Re: [RFC] gdb/testsuite/gdb.base/fileio.exp patch for cygwin

Christopher Faylor
2007-12-07T13:36:27Z

On Thu, Dec 06, 2007 at 10:23:32AM +0100, Corinna Vinschen wrote:
>On Dec 6 03:42, Pedro Alves wrote:
>> Pedro Alves wrote:
>> > Daniel Jacobowitz wrote:
>> > > I might be mistaken, but I don't think there's any way to figure out
>> > > the original identity of the pipe.
>> >
>> > There may be other ways to identify the pipes, like using
>> > named pipes for the ttys if possible -- but I don't know if
>> > it's possible to get a pipe name from a pipe handle.
>>
>> Been googling a bit, and, as the Cygwin folks sure know,
>> under NT it is possible to get the internal names of objects,
>> and NT assigns unique names to pipes.
>
>It does up to Windows 2003 Server. On Vista, anonymous pipes are really
>anonymous and you can't retrieve a name anymore.
>
>> Since the next big Cygwin release will be NT only, perhaps this could
>> be used to map pipes to ttys.
>>
>> Disclosure: I haven't really looked into Cygwin's sources to see
>> what it would take. It may be saying something plain dumb.
>
>It requires to switch to named pipes due to Vista. And you're still
>missing any tty settings afterwards, you just have a naked handle to
>start over with. This is not on my TODO list for the next major version,
>but patches are of course welcome!

Fixing ttys is on my todo list, so there may be some hope there.

cgf