summaryrefslogtreecommitdiff
path: root/usr.bin/write
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-02 16:25:31 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-02 16:25:31 +0000
commit497186a12d85d86f63b6e5cdf0b5292a83fdb5d7 (patch)
tree1ef8c23d8d7fb0991766bc113b85be7d941edb10 /usr.bin/write
parent2fc661c829a5e13be78e419755695c7f6c4d653b (diff)
avoid stdio in signal handler
Diffstat (limited to 'usr.bin/write')
-rw-r--r--usr.bin/write/write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c
index 81c0f647cb6..46f83c37ae1 100644
--- a/usr.bin/write/write.c
+++ b/usr.bin/write/write.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: write.c,v 1.12 2001/06/27 06:53:55 jasoni Exp $ */
+/* $OpenBSD: write.c,v 1.13 2001/11/02 16:25:30 deraadt Exp $ */
/* $NetBSD: write.c,v 1.5 1995/08/31 21:48:32 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)write.c 8.2 (Berkeley) 4/27/95";
#endif
-static char *rcsid = "$OpenBSD: write.c,v 1.12 2001/06/27 06:53:55 jasoni Exp $";
+static char *rcsid = "$OpenBSD: write.c,v 1.13 2001/11/02 16:25:30 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -290,7 +290,7 @@ do_write(tty, mytty, myuid)
void
done(int sig)
{
- (void)printf("EOF\r\n"); /* XXX signal race */
+ (void)write(STDOUT_FILENO, "EOF\r\n", 5);
if (sig)
_exit(0);
else