Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!uw-beaver!ssc-vax!uvicctr!sbanner1 From: sbanner1@uvicctr.UUCP Newsgroups: comp.unix.questions Subject: How do I wait for Terminal IO to compleate?? Message-ID: <245@uvicctr.UUCP> Date: Sun, 29-Mar-87 18:41:41 EST Article-I.D.: uvicctr.245 Posted: Sun Mar 29 18:41:41 1987 Date-Received: Thu, 2-Apr-87 01:28:41 EST Organization: University of Victoria, Victoria B.C. Canada Lines: 28 Hello, I have recently been working on a program that I run in my .logout just before I do an stty 0 (I have to do the stty 0 because if I leave stuff running in the background when I logout, UNIX hangs onto the terminal, and we have about 7 different machines that are all accessed through the same terminals). The problem is that this program writes some stuff out to the screen, then exits, then the stty kills the terminal after only about half of the stuff has been written out. I have been given the suggestion that I could just pause for a few seconds, but that is klugy, and if I then go to a slower terminal (I regularly use 9600baud, and 1200baud, but sometimes 300), I will have to increase the delay, and I want the terminal to become free for other users as quickly as possible. I know that there is an ioctl that will see if there is any pending input, but is there a similar one for output (I have looked, but I can't find it). I have tried flushing the files before I exit, but that doesn't help. HELP!!!!! Thanks, S. John Banner UUCP ...!{uw-beaver,ubc-vision}!uvicctr!sol!sbanner1 BITNET ccsjb@uvvm ARPA sbanner1@sol.UVIC.CDN #1 1121 Fort St. Victoria BC. Canada V8V 3K9