From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 23 13:32:34 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 ED9AB10656B9 for ; Fri, 23 Oct 2009 13:32:34 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 720C58FC13 for ; Fri, 23 Oct 2009 13:32:34 +0000 (UTC) Received: by fxm6 with SMTP id 6so9751585fxm.43 for ; Fri, 23 Oct 2009 06:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=x7nYXaeO2A5OObKqqNzAr4R3IDRDkH3lo9kSpayWJ6k=; b=nHe33BOOPbYhd6jtnN0XLLnt+ey7rietqeGfc/02WTeJbLUMFMhC4KP7OmcNbWUHgm 6a46eP2mM8ZXHfK1YqEul8apbekaToMGAElHgxsglUK3DHOebmKPfQ70PDC/r1h84d9M pBKEC/OzEV2Rddf2w8LuGgtWNbWdQT9m8IiY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AEfaDthqmWVRNOv820XSo4qwEzbZPoujX7NsttX5hWlCxFykkZjb0QgSCJFLcP2zSH WEKK+bPECV69Toi1gOoUU/zwIoVyHvhvaOkIuxOzsGDPu1HjFYeA+iNSItTT1vgflvK5 trrt+75Ip1uGP/CNT1SR1NAKnoeBNvKTbwKAg= MIME-Version: 1.0 Received: by 10.204.32.204 with SMTP id e12mr5335056bkd.51.1256304752743; Fri, 23 Oct 2009 06:32:32 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Oct 2009 17:32:32 +0400 Message-ID: From: pluknet To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Antony Mawer , 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 13:32:35 -0000 2009/10/23 Alexander Best : > pluknet schrieb am 2009-10-23: >> 2009/10/23 Alexander Best : >> > Gary Jennejohn schrieb am 2009-10-23: >> >> On Fri, 23 Oct 2009 12:58:43 +0400 >> >> pluknet wrote: > >> >> > 2009/10/23 Antony Mawer : >> >> > > 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. > >> >> > > I am wondering if this has anything to do with the new tty >> >> > > subsystem >> >> > > in 8.0, as this wasn't a problem I've experienced before under >> >> > > 7.x... > > >> >> > No, that's a regression appeared in (FreeBSD'ish? version of) ee >> >> > 1.5.0. > > >> >> SIGWINCH is handled in new_curse.c, but it's not being >> >> compiled/linked. > >> >> --- >> >> Gary Jennejohn > >> > i think that file is only used on systems which have >> > termio.h/sgtty.h and ee >> > doesn't get linked against ncurses. on those systems (linux e.g.) >> > new_curse.c >> > is used to handle certain things which ncurses takes care under >> > freebsd. > >> > this is under freebsd: > >> > `make`: >> > Neither termio.h or sgtty.h are on this system! >> > Relying on local curses implementation. >> > Generating make.local >> > make -f make.local >> > cc ee.c -o ee -ggdb -DDIAG -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB >> > -DHAS_CTYPE >> > -DHAS_SYS_IOCTL -DHAS_SYS_WAIT =A0 -DSLCT_HDR >> > -DTERMCAP=3D"\"/usr/share/misc/termcap\"" -lcursesw > >> > `ldd ee`: >> > libncursesw.so.8 =3D> /lib/libncursesw.so.8 (0x2809b000) >> > libc.so.7 =3D> /lib/libc.so.7 (0x280e9000) > > >> [Probably already mentioned.] > >> btw, ee compiled under fbsd with new_curse.c >> (and not linked with curses/cursesw) goes fine with SIGWINCH. > >> --- Makefile.old =A0 =A0 =A0 =A02009-10-23 16:13:45.000000000 +0400 >> +++ Makefile =A0 =A02009-10-23 16:30:03.000000000 +0400 >> @@ -3,15 +3,14 @@ >> =A0.PATH: ${.CURDIR}/../../contrib/ee > >> =A0CFLAGS+=3D -DHAS_NCURSES -DHAS_UNISTD -DHAS_STDARG -DHAS_STDLIB \ >> - =A0 =A0 =A0 =A0-DHAS_SYS_WAIT >> + =A0 =A0 =A0 =A0-DHAS_SYS_WAIT -DCAP -DNCURSE > >> =A0PROG=3D =A0ee >> +SRCS=3D =A0ee.c new_curse.c >> =A0LINKS=3D ${BINDIR}/ee ${BINDIR}/ree ${BINDIR}/ee ${BINDIR}/edit >> =A0MLINKS=3D =A0 =A0 =A0 =A0ee.1 ree.1 ee.1 edit.1 >> -DPADD=3D ${LIBNCURSES} >> -LDADD=3D -lncurses > >> -WARNS?=3D =A0 =A0 =A0 =A02 >> +WARNS?=3D =A0 =A0 =A0 =A00 > >> =A0NLS=3D =A0 en_US.US-ASCII fr_FR.ISO8859-1 de_DE.ISO8859-1 >> =A0pl_PL.ISO8859-2 \ >> =A0 =A0 =A0 =A0 uk_UA.KOI8-U ru_RU.KOI8-R hu_HU.ISO8859-2 > >> $ ldd ./ee >> ./ee: >> =A0 =A0 =A0 =A0 libc.so.6 =3D> /lib/libc.so.6 (0x2808a000) > >> (yes, it's FreeBSD 6.x). > > won't work under CURRENT i'm afraid: > > Warning: Object directory not changed from original /usr/src/usr.bin/ee > cc =A0-O2 -fno-strict-aliasing -pipe -march=3Dnative -DHAS_NCURSES -DHAS_= UNISTD > -DHAS_STDARG -DHAS_STDLIB =A0-DHAS_SYS_WAIT -DCAP -DNCURSE -std=3Dgnu99 > -fstack-protector -Wno-pointer-sign -c > /usr/src/usr.bin/ee/../../contrib/ee/ee.c > In file included from /usr/src/usr.bin/ee/../../contrib/ee/ee.c:68: > /usr/src/usr.bin/ee/../../contrib/ee/new_curse.h:47:19: error: sgtty.h: N= o > such file or directory > *** Error code 1 > > Stop in /usr/src/usr.bin/ee. > > here's the entry in ObsoleteFiles.inc: > > # 20080725: sgtty.h removed > OLD_FILES+=3Dusr/include/sgtty.h > > alex > Ah, OK. Just a stupid and not-tested guess. --=20 wbr, pluknet