This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

Re: [mingw32] stdin redirection


> Mark Mitchell pointed out the same thing that Dave did -
> WaitForMultipleObjects is documented to take various things.  One of
> them is an event handle.  None of them are pipe handles nor file
> handles.  What we're doing now for pipes is within the bounds of the
> MS documentation; passing it directly to select is not and I think it
> would be unwise.  Windows is confusing enough when you use it as
> documented.

I'm understanding better and better how this is supposed to work in GDB
as well as what the Windows API provides, and I agree with you on all
counts.

> If you want to add a third case that handles files, maybe by checking
> if they are seekable and if so that the position is not at the end,
> I'd be more OK with that.  You could return a signalled event handle
> if there are bytes and an unsignalled one if there are not.

Let's try to do that. If the check you suggest allows us to differentiate
between pipes and files without corrupting pipe handles, then the rest
should be pretty easy...

Thanks a lot for everyone's help!
-- 
Joel


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