Mail Archives: cygwin-developers/2002/09/08/15:36:08
On Sun, Sep 08, 2002 at 09:55:42PM +0400, egor duda wrote:
>Hi!
>
>Sunday, 08 September, 2002 Christopher Faylor cgf AT redhat DOT com wrote:
>
>CF> If you don't want to understand what's going on then that is perfectly
>CF> fine. However, please don't just assume that if turning on an ifdef
>CF> causes a problem to apparently go away that you've done anything more
>CF> than add an additional delay to cygwin or moved something to a different
>CF> memory location or something.
>
>I'm doing my best to understand how things work. And i concluded that
>for handle protection to work right it's essential to update the list
>whenever we call DuplicateHandle() and replace some handle with its
>duplicate. Maybe i'm wrong here, please correct me if so.
You're not wrong, but that is precisely what is *not* happening when
you turn on the conditional. There are other DuplicateHandles that
do not call ProtectHandle AFAIK, now, handles from the fd table should
not be put in the protected handle list. As I said, it is too hard
to get it right.
Hmm. Maybe ttys are still being put there and that's what you're seeing.
Yep. That's possible. Maybe removing these:
set_io_handle (from_master_local); // This one
ProtectHandle1INH (from_master_local, from_pty);
set_output_handle (to_master_local);
ProtectHandle1INH (to_master_local, to_pty); // and this one
would make things better. I've checked in a patch.
cgf
- Raw text -