This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin 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: hang in sig_wait waiting for debug lock


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


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