Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2010 01:30:01 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Ed Schouten <ed@freebsd.org>, hackers@freebsd.org
Subject:   tty or script(1) weirdness?
Message-ID:  <20100310093001.GL22317@elvis.mu.org>

next in thread | raw e-mail | index | archive | help
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



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