From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 10 09:30:01 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD6B31065672 for ; Wed, 10 Mar 2010 09:30:01 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A73A48FC1F for ; Wed, 10 Mar 2010 09:30:01 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id 617331A3C4D; Wed, 10 Mar 2010 01:30:01 -0800 (PST) Date: Wed, 10 Mar 2010 01:30:01 -0800 From: Alfred Perlstein To: Ed Schouten , hackers@freebsd.org Message-ID: <20100310093001.GL22317@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: tty or script(1) weirdness? 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: Wed, 10 Mar 2010 09:30:01 -0000 Hey Ed, Hackers I've been experiencing a weird issue where when I invoke a program via script and it exits after much output, it seems to have its output truncated. The data winds up not on the screen or in the log file. I have a link here to a set of scripts that will easily provoke this issue. The shell script "test.sh" calls the perl script under "script" then makes sure that the expected number of characters are emitted. If you run "test.sh" with an argument, it will have the perl script "sleep(1)", then you will not see the problem. As a stop-gap, I'm probably going to add the sleep(1) to my code at work, but I'm worried that: 1) I'm dumb and am doing something really silly and ought to be mocked for it. :) 2) Something is broken in the tty system? 3) Script has more bugs than I had originally thoughts. Anyhow, to test this: 1) download the suite. 2) run "sh test.sh" to see the bug 3) run "sh test.sh yes" to not see the bug (sleep called) Here's a link to the scripts: http://www.mu.org/~bright/scripttest/ -- - Alfred Perlstein .- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250 .- FreeBSD committer