re-directing 'rup' to a file

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Wed Mar 6 15:00:55 AEST 1991


In article <1991Mar05.080251.15424 at convex.com> tchrist at convex.COM (Tom Christiansen) writes:
> You need to get it to think its output is a tty.  Dan will
> suggest using pty.

Yep, like % timeout 10 pty rup > rup.list.

> While it's nice that pty should care of a lot of
> obnoxious things like this, I think that this is just a hack
> around a problem caused by lack of design forethought in stdio:
> you shouldn't need a whole pty just to get line buffering!

Agreed. This brings up a general question: How should the system have
been organized in the first place to avoid such problems? People often
suggest an environment variable to control stdio buffering, but this
doesn't seem like enough to me. I don't think stdio should even do the
initial stat(), or provide isatty(). Do new users really expect ls or
more to behave differently inside a pipe? Does any program really
benefit from buffering differently when it writes to a file? I doubt it.

---Dan



More information about the Comp.unix.questions mailing list