Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2012 00:22:45 -0500
From:      Brandon Gooch <jamesbrandongooch@gmail.com>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        freebsd-stable@freebsd.org, Jilles Tjoelker <jilles@stack.nl>
Subject:   Re: sh(1) exiting on SIGWINCH
Message-ID:  <CALBk6yJ-jZ5FNhmrcpGCQkoc0vzZhbXdW3XYgjqr-nLp5a_Ozw@mail.gmail.com>
In-Reply-To: <20120704220847.GA27624@server.rulingia.com>
References:  <20120704100332.GA70705@server.rulingia.com> <20120704220847.GA27624@server.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 4, 2012 at 5:08 PM, Peter Jeremy <peter@rulingia.com> wrote:
> On 2012-Jul-04 20:03:32 +1000, Peter Jeremy <peter@server.rulingia.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALBk6yJ-jZ5FNhmrcpGCQkoc0vzZhbXdW3XYgjqr-nLp5a_Ozw>