Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com X-Apparently-From: Message-ID: <3AF6E0E8.4E9B14E6@yahoo.com> Date: Mon, 07 May 2001 13:52:40 -0400 From: Earnie Boyd Reply-To: Cygwin Developers X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin-developers AT cygwin DOT com Subject: Re: Signal fixes [WAS: Re: Fix for ssh problems] References: <20010504224503 DOT A20310 AT redhat DOT com> <20010505104012 DOT A29822 AT cygbert DOT vinschen DOT de> <20010505124737 DOT B4038 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Christopher Faylor wrote: > > It only took two days or so for me to realize that my stack walking code > was screwed up. The way signals work is that cygwin routines register > their frame pointers on entry. If a signal occurs, then the location on > the stack which has the return address is replaced with a call to a > signal handler prefix which resets a "signal_arrived" event and calls > any appropriate signal handler. > > I'd changed things so that the call to the signal handler prefix was > being put on the caller of the function's return rather than the > functions return. So, the signal_arrived event was never being reset. > This caused a WaitForMultipleObjects in select() to be continually > triggered. > > I have had this problem so many times that I'm embarrassed that it took > two days for me to figure out what the problem was. This was due to my > changes to the stack dump stuff in cygwin. It uses the same code to > walk the stack as the signal handler. So, when I made the stack dumper > work better for exceptions, I broke the signal handler. > > Exceptions are strange because, while they set up something that looks > like a frame pointer on the stack, it isn't a true frame pointer, so you > have to make allowances. You don't have to make those allowances for > the signal handler. > > After seeing this problem, I have another idea on how to handle signals. > It could be a cleaner implementation but now that the current version > isn't broke, I'm a little reluctant to fix it. Maybe in 1.3.4... > Just a note that this also fixed a problem of rxvt not ending when bash logged out. Earnie. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com