Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!genrad!decvax!harpo!floyd!vax135!ariel!houti!hogpc!houxm!ihnp4!cbosgd!mark From: mark@cbosgd.UUCP Newsgroups: net.unix-wizards,net.bugs.4bsd Subject: Re: 4.1 Bsd terminal handler improvements Message-ID: <52@cbosgd.UUCP> Date: Tue, 21-Jun-83 23:46:43 EDT Article-I.D.: cbosgd.52 Posted: Tue Jun 21 23:46:43 1983 Date-Received: Wed, 22-Jun-83 20:58:22 EDT Lines: 6 Note that TIOCDRAIN can be emulated in 4.1BSD with TIOCOUTQ, which returns the number of characters waiting in the queue. You loop until it goes below the level you want (waiting until zero may result in jerky output). A high resolution sleep, such as nap, or select, or the fast timer driver, helps. TIOCOUTQ does not seem to be documented in 4.1 or 4.1c.