Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!fortune!rpw3
From: rpw3@fortune.UUCP
Newsgroups: net.unix-wizards
Subject: Re: output redirection from a  compat - (nf)
Message-ID: <3565@fortune.UUCP>
Date: Sun, 10-Jun-84 07:06:31 EDT
Article-I.D.: fortune.3565
Posted: Sun Jun 10 07:06:31 1984
Date-Received: Mon, 11-Jun-84 00:29:27 EDT
Sender: notes@fortune.UUCP
Organization: Fortune Systems, Redwood City, CA
Lines: 32

#R:linus:-97200:fortune:11600099:000:1233
fortune!rpw3    Jun 10 01:41:00 1984

Re: getting programs to do unbuffered output if you only have binaries of them

All of the previous responses have correctly analyzed the problem (no 'fflush'
when needed on a non-terminal stdout), but none provided solutions. Here is a
generic solution (but I may hate myself when I read this in the morning :-)

[ UGLY UGLY UGLY hack#1 ]
If you have ptys on your system, you can 'cu' to the master side of
a pty (you may have to hack up 'cu' to get this to work), log in again
on the other side, send yourself a redirection LEAVING ECHOING ON
(use "~>>file", note no colon), run your chess example, and close
your log file with 'echo "~>"', and logout, and logout.

[ UGLY UGLY UGLY hack#2 ]
If you have a network, and a 'vtp' that can make a log/script file, "connect"
to the system you are on and proceed as above...

[ UGLY UGLY UGLY hack#3 ]
If all else fails, and you have at least one dialout line plus one more
dialin line, use 'cu', dialout, dialin, and see Lemma #1...

(Sometimes you just have to get the job done, no matter how ugly the hack.)

Rob Warnock

UUCP:	{ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3
DDD:	(415)595-8444
USPS:	Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065