hang in sig_wait waiting for debug lock

Christopher Faylor cgf@redhat.com
Sun Sep 8 12:36:00 GMT 2002


On Sun, Sep 08, 2002 at 09:55:42PM +0400, egor duda wrote:
>Hi!
>
>Sunday, 08 September, 2002 Christopher Faylor cgf@redhat.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



More information about the Cygwin-developers mailing list