Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Oct 2009 12:36:35 +0200 (CEST)
From:      Alexander Best <alexbestms@math.uni-muenster.de>
To:        Nate Eldredge <nate@thatsmathematics.com>, Antony Mawer <lists@mawer.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH
Message-ID:  <permail-20091023103635f0889e8400002040-a_best01@message-id.uni-muenster.de>
In-Reply-To: <Pine.GSO.4.64.0910222108490.5432@zeno.ucsd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> ><alexbestms@math.uni-muenster.de> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-20091023103635f0889e8400002040-a_best01>