summaryrefslogtreecommitdiffstats
path: root/usr.bin/msgs/msgs.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-02-21 04:15:15 +0000
committerwollman <wollman@FreeBSD.org>1995-02-21 04:15:15 +0000
commit27a28f2789d7f721db507205aa71b30c863c6f84 (patch)
tree577ad17c7ed60de6090e4d00e0f8551cd1f5fcbb /usr.bin/msgs/msgs.c
parent508504ecfff98cd984e3ce7369097c1f422ee856 (diff)
downloadFreeBSD-src-27a28f2789d7f721db507205aa71b30c863c6f84.zip
FreeBSD-src-27a28f2789d7f721db507205aa71b30c863c6f84.tar.gz
Use tcflush(), eliminate libcompat.
Diffstat (limited to 'usr.bin/msgs/msgs.c')
-rw-r--r--usr.bin/msgs/msgs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c
index 9a5311a..c7bde8a 100644
--- a/usr.bin/msgs/msgs.c
+++ b/usr.bin/msgs/msgs.c
@@ -75,7 +75,7 @@ static char sccsid[] = "@(#)msgs.c 8.1 (Berkeley) 6/6/93";
#include <errno.h>
#include <pwd.h>
#include <setjmp.h>
-#include <sgtty.h>
+#include <termios.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
@@ -130,7 +130,6 @@ int nlines;
int Lpp = 0;
time_t t;
time_t keep;
-struct sgttyb otty;
char *mktemp();
char *nxtfld();
@@ -162,7 +161,7 @@ int argc; char *argv[];
setbuf(stdout, NULL);
#endif
- gtty(fileno(stdout), &otty);
+
time(&t);
setuid(uid = getuid());
ruptible = (signal(SIGINT, SIG_IGN) == SIG_DFL);
@@ -632,8 +631,8 @@ int length;
fflush(stdout);
}
- /* trick to force wait on output */
- stty(fileno(stdout), &otty);
+ /* force wait on output */
+ tcdrain(fileno(stdout));
}
void
OpenPOWER on IntegriCloud