From owner-freebsd-stable@FreeBSD.ORG Sun Jul 14 21:37:35 2013 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8FE9AA3C for ; Sun, 14 Jul 2013 21:37:35 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 58246ED for ; Sun, 14 Jul 2013 21:37:35 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id B273C35931A; Sun, 14 Jul 2013 23:37:34 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9929C28494; Sun, 14 Jul 2013 23:37:34 +0200 (CEST) Date: Sun, 14 Jul 2013 23:37:34 +0200 From: Jilles Tjoelker To: Eugene Grosbein Subject: Re: script(1), cfmakeraw() and Ctrl-Z Message-ID: <20130714213734.GB30708@stack.nl> References: <51E2DC6B.2090605@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51E2DC6B.2090605@grosbein.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jul 2013 21:37:35 -0000 On Mon, Jul 15, 2013 at 12:14:19AM +0700, Eugene Grosbein wrote: > I've noted that commands like "script -qa /tmp/log sleep 100" > cannot be suspended with Ctrl-Z keys. The reason is call to cfmakeraw() > in script.c - if I comment it out, Ctrl-Z starts to work as expected. > portupgrade uses script(1) so build/install process cannot be suspended too. > (I'm building libreoffice-4.04 now) > The function cfmakeraw() is used since CVS revision 1.1 when script > was imported with other "BSD 4.4 Lite Usr.bin Sources". > Is cfmakeraw() really needed? The cfmakeraw() call ensures that the processes running within script get all control characters. For example, you can suspend a job in the inner shell using Ctrl+Z. This indeed makes it impossible to suspend script itself. -- Jilles Tjoelker