Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!agate!saturn!haynes From: haynes@saturn.ucsc.edu ( Computer Center) Newsgroups: comp.unix.wizards Subject: script > mumble a trap for the unwary Summary: should it be 'fixed' ? Message-ID: <4975@saturn.ucsc.edu> Date: 30 Sep 88 21:33:02 GMT Reply-To: haynes@saturn.ucsc.edu (Jim Haynes - Computer Center) Organization: University of California, Santa Cruz Lines: 15 References: Had a user complain that he said script > filename and everything locked up and he had to go to another terminal and kill the job. Of course what really happened is just that the script program ran as it should have, and all the output, prompts, etc. went into the file where he had redirected them. He could have got out of it by typing a ctrl-D to end the script run. So - I'm thinking of sticking in something along the lines of if (!isatty(1)) fprintf(stderr, "Redirecting output may not be what you have in mind. Type a ctrl-D if you want to start over.\n");