From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 23 10:36:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 248B2106566B for ; Fri, 23 Oct 2009 10:36:38 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-exrelay2.uni-muenster.de (ZIVM-EXRELAY2.UNI-MUENSTER.DE [128.176.192.15]) by mx1.freebsd.org (Postfix) with ESMTP id AAFED8FC12 for ; Fri, 23 Oct 2009 10:36:37 +0000 (UTC) X-IronPort-AV: E=Sophos;i="4.44,611,1249250400"; d="scan'208";a="227023245" Received: from zivmaildisp1.uni-muenster.de (HELO ZIVMAILUSER01.UNI-MUENSTER.DE) ([128.176.188.85]) by zivm-relay2.uni-muenster.de with ESMTP; 23 Oct 2009 12:36:35 +0200 Received: by ZIVMAILUSER01.UNI-MUENSTER.DE (Postfix, from userid 149459) id C4CA51B0766; Fri, 23 Oct 2009 12:36:35 +0200 (CEST) Date: Fri, 23 Oct 2009 12:36:35 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Nate Eldredge , Antony Mawer Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2009 10:36:38 -0000 Nate Eldredge schrieb am 2009-10-23: > On Fri, 23 Oct 2009, Antony Mawer wrote: > >On Fri, Oct 23, 2009 at 1:35 PM, Alexander Best > > wrote: > >>hi everyone, > >>together with hugh mahon (the author of ee) i've been trying to > >>fix a nasty > >>bug in ee. for some reason ee exits (not crashes) and leaves the > >>console > >>corrupted when receiving SIGWINCH (`killall -SIGWINCH ee` should > >>exit all > >>running ee instances). > >I noticed this the other day when working on a new 8.0-RC1 system... > >in my case I was using putty (Windows ssh client) to access the > >system > >and maximised the window I had ee running in, and noticed ee just > >dumped me straight to the prompt. > Seems a good start might be to compile ncurses with -g, link ee > against it, put a breakpoint on the SIGWINCH handler, and start > single stepping... > -- > Nate Eldredge > nate@thatsmathematics.com it seems ncurses registers a standard libc function with SIGWINCH. i started gdb, loaded ee and did "handle SIGWINCH stop" when i do "run" and issue a SIGWINCH to ee this is the output: Program received signal SIGWINCH, Window size changed. 0x281a4063 in read () from /lib/libc.so.7 (gdb) nexti 0x281a4048 in write () from /lib/libc.so.7 (gdb) nexti 0x281a4049 in write () from /lib/libc.so.7 (gdb) nexti 0x281a404e in write () from /lib/libc.so.7 (gdb) nexti 0x281a404f in write () from /lib/libc.so.7 (gdb) nexti 0x281a4055 in write () from /lib/libc.so.7 (gdb) nexti Program exited normally. so i guess ee calls some ncurses function right at the beginning. that ncurses function registers a new function to be called upon SIGWINCH (maybe exit(3)). cheers. alex