From 9a190421759999d2a1042bf36272e46673356e33 Mon Sep 17 00:00:00 2001 From: cheloha Date: Fri, 24 Aug 2018 18:36:56 +0000 Subject: [PATCH] Drop special handling of SIGSYS. Tolerance for up to 25 SIGSYS deliveries was added to init(8) soon after the addition of sysctl(2) at CSRG, presumably to ease the transition to the new ABI. After 25 years of work the ABI transition is finally complete and we can now safely remove this splint. In general, we now have better practices and methods for helping userspace across kernel ABI breaks. ok deraadt@ --- sbin/init/init.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/sbin/init/init.c b/sbin/init/init.c index 16e12c220cd..f854c6acc3a 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.67 2018/01/31 15:57:44 cheloha Exp $ */ +/* $OpenBSD: init.c,v 1.68 2018/08/24 18:36:56 cheloha Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -91,7 +91,6 @@ void stall(char *, ...); void warning(char *, ...); void emergency(char *, ...); void disaster(int); -void badsys(int); typedef enum { invalid_state, @@ -261,9 +260,8 @@ main(int argc, char *argv[]) * We catch or block signals rather than ignore them, * so that they get reset on exec. */ - handle(badsys, SIGSYS, 0); handle(disaster, SIGABRT, SIGFPE, SIGILL, SIGSEGV, - SIGBUS, SIGXCPU, SIGXFSZ, 0); + SIGBUS, SIGSYS, SIGXCPU, SIGXFSZ, 0); handle(transition_handler, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGUSR1, SIGUSR2, 0); handle(alrm_handler, SIGALRM, 0); @@ -379,22 +377,6 @@ emergency(char *message, ...) va_end(ap); } -/* - * Catch a SIGSYS signal. - * - * These may arise if a system does not support sysctl. - * We tolerate up to 25 of these, then throw in the towel. - */ -void -badsys(int sig) -{ - static int badcount = 0; - - if (badcount++ < 25) - return; - disaster(sig); -} - /* * Catch an unexpected signal. */ -- 2.20.1