summaryrefslogtreecommitdiff
path: root/regress/lib/libpthread/pause/pause.c
diff options
context:
space:
mode:
Diffstat (limited to 'regress/lib/libpthread/pause/pause.c')
-rw-r--r--regress/lib/libpthread/pause/pause.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/regress/lib/libpthread/pause/pause.c b/regress/lib/libpthread/pause/pause.c
index 8185e7ca2d0..20a49f061a6 100644
--- a/regress/lib/libpthread/pause/pause.c
+++ b/regress/lib/libpthread/pause/pause.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pause.c,v 1.1 2001/08/15 14:37:12 fgsch Exp $ */
+/* $OpenBSD: pause.c,v 1.2 2001/11/11 23:26:35 deraadt Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996 by Chris Provenzano and contributors,
* proven@mit.edu All rights reserved.
@@ -48,7 +48,12 @@ void
handler(sig)
int sig;
{
- printf("%s\n", strsignal(sig));
+ int save_errno = errno;
+ char buf[8192];
+
+ snprintf(buf, sizeof buf, "%s\n", strsignal(sig));
+ write(STDOUT_FILENO, buf, strlen(buf));
+ errno = save_errno;
}
int