summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-03-30 22:20:53 +0000
committermillert <millert@openbsd.org>2015-03-30 22:20:53 +0000
commit79ca4853ea466561fc51d0ccea476d9b56434c7b (patch)
treeb6e8c5a9e06b9310c186e51aa256989f8e7d9e0c
parentDo not install signal handlers for SIGABRT, SIGBUS or SIGSEGV. Also (diff)
downloadwireguard-openbsd-79ca4853ea466561fc51d0ccea476d9b56434c7b.tar.xz
wireguard-openbsd-79ca4853ea466561fc51d0ccea476d9b56434c7b.zip
Use _exit() from signal handler so we don't call atexit handlers or
flush stdio.
-rw-r--r--usr.bin/sort/sort.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 5a68256db74..1d4da6abd7f 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sort.c,v 1.49 2015/03/30 22:20:18 millert Exp $ */
+/* $OpenBSD: sort.c,v 1.50 2015/03/30 22:20:53 millert Exp $ */
/*-
* Copyright (C) 2009 Gabor Kovesdan <gabor@FreeBSD.org>
@@ -386,7 +386,7 @@ sig_handler(int sig __unused)
{
clear_tmp_files();
- exit(2);
+ _exit(2);
}
/*