Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: re-directing 'rup' to a file Message-ID: <6580:Mar605:00:5591@kramden.acf.nyu.edu> Date: 6 Mar 91 05:00:55 GMT References: <1991Mar5.014821.1555@unixland.uucp> <1991Mar05.080251.15424@convex.com> Organization: IR Lines: 20 In article <1991Mar05.080251.15424@convex.com> tchrist@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