From owner-freebsd-stable@FreeBSD.ORG Thu Jul 5 05:22:46 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5C011065670 for ; Thu, 5 Jul 2012 05:22:46 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id AAE148FC0C for ; Thu, 5 Jul 2012 05:22:46 +0000 (UTC) Received: by obbun3 with SMTP id un3so16116910obb.13 for ; Wed, 04 Jul 2012 22:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=abyw2QM9mWJRvbaasaAWbkf1FJXZUfMdItv9dlcdg7k=; b=HWpmgKdZjtod6F+H1FyYbdS6o6LJ0rUtG0grZVQF4rcSygC/5wdLl3DvQNB3dPJCDv ZbFEUdgGkIh6bHS8aPoNhXCZsQWgsD+wMJtmdxmeeQZtlWuS113KXHFBC8Q26di9wFqa mMNbNFVA5NoGBxYb8u1bi440WOgdPxAvw1KRO0BKJyw2BWHhXKMYaHVT1ZUuc80s1R26 ALfCLC99RHjcuUJS+v1biQWQfQeuXC1Z84+Z/uZNqx8xxFXasZoGpKPEyY1hgtXFvKgV MvvUtuw04GslmOE3WjPPluTyOrt+5omSbrSD5hA9syYgy8KUuMvXMj/wo0zMYZjHNLOL /EXg== MIME-Version: 1.0 Received: by 10.60.18.114 with SMTP id v18mr25206575oed.34.1341465766022; Wed, 04 Jul 2012 22:22:46 -0700 (PDT) Received: by 10.60.61.38 with HTTP; Wed, 4 Jul 2012 22:22:45 -0700 (PDT) In-Reply-To: <20120704220847.GA27624@server.rulingia.com> References: <20120704100332.GA70705@server.rulingia.com> <20120704220847.GA27624@server.rulingia.com> Date: Thu, 5 Jul 2012 00:22:45 -0500 Message-ID: From: Brandon Gooch To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org, Jilles Tjoelker Subject: Re: sh(1) exiting on SIGWINCH X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 05:22:47 -0000 On Wed, Jul 4, 2012 at 5:08 PM, Peter Jeremy wrote: > On 2012-Jul-04 20:03:32 +1000, Peter Jeremy wrote: >>I've recently updated a box from 8-stable to 9-stable/amd64 (r237995), >>compiled with gcc, and now sh(1) exits if I change the window size >>(ssh'ing to the target system within an xterm). I don't recall ever >>seeing this sort of behaviour before and am still trying to track down >>the relevant code path. > > Someone pointed me at kern/169603 and I can confirm that reverting > r237738 (MFC of r237448) fixes the problem. Unfortunately, that is a > fairly large patch and so I haven't investigated further. > > -- > Peter Jeremy I just ran into this myself. Seems that the window resize is somehow causing sh(1) to receive an EOF while the shell is sitting at the prompt, which results in the shell exiting; haven't dug too deeply into the source yet, but can you try to run /bin/sh with the '-I' (that's capital letter 'i') and it the shell shouldn't exit (but it will bark at you with a 'Use "exit" to leave shell.' message on each resize. I'm CC'ing jilles@ for any potential insight into the behavior of sh(1) (and perhaps this updated libedit snapshot). Very disconcerting when I encountered this; glad I'm not alone on this one :) -Brandon