From 3365188948c22c0cd742dd8abd95d9abc04d644c Mon Sep 17 00:00:00 2001 From: guenther Date: Sun, 25 Oct 2015 04:11:00 +0000 Subject: [PATCH] Use dprintf() instead of fprintf() in the signal handler --- regress/lib/libc/atexit/atexit_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/regress/lib/libc/atexit/atexit_test.c b/regress/lib/libc/atexit/atexit_test.c index f374dee9eb3..e1ea82f827b 100644 --- a/regress/lib/libc/atexit/atexit_test.c +++ b/regress/lib/libc/atexit/atexit_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atexit_test.c,v 1.7 2014/06/18 19:01:10 kettenis Exp $ */ +/* $OpenBSD: atexit_test.c,v 1.8 2015/10/25 04:11:00 guenther Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier @@ -38,6 +38,7 @@ #include #include #include +#include #include "stdlib/atexit.h" void handle_first(void); @@ -131,10 +132,10 @@ handle_signal(int sigraised) { switch (sigraised) { case SIGSEGV: - fprintf(stderr, "SIGSEGV\n"); + dprintf(STDERR_FILENO, "SIGSEGV\n"); exit(0); default: - fprintf(stderr, "unexpected signal caught\n"); + dprintf(STDERR_FILENO, "unexpected signal caught\n"); exit(1); } } -- 2.20.1