summaryrefslogtreecommitdiffstats
path: root/usr.bin/write/write.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-11-02 16:25:11 +0000
committerderaadt <deraadt@openbsd.org>2001-11-02 16:25:11 +0000
commit0da342ac26bd0bb4649213d85b58726219060e58 (patch)
tree04c666bf83f44657407756e02a178f02cf849c28 /usr.bin/write/write.c
parentuse _exit() in signal handler (diff)
downloadwireguard-openbsd-0da342ac26bd0bb4649213d85b58726219060e58.tar.xz
wireguard-openbsd-0da342ac26bd0bb4649213d85b58726219060e58.zip
avoid stdio in signal handler
Diffstat (limited to 'usr.bin/write/write.c')
-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