From dd328645b4c3bd6adea5d0d74eb4f6f20ba640fb Mon Sep 17 00:00:00 2001 From: Esben Norby Date: Mon, 15 Aug 2005 18:58:48 +0000 Subject: Fix possible race condition in signal handler. Report and fix from Micheal Knudsen. Prep, test and OK claudio@ --- usr.sbin/ospfd/ospfd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index c232037538f..76fb186ca5b 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.22 2005/06/21 19:10:22 claudio Exp $ */ +/* $OpenBSD: ospfd.c,v 1.23 2005/08/15 18:58:47 norby Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -80,8 +80,8 @@ main_sig_handler(int sig, short event, void *arg) switch (sig) { case SIGTERM: case SIGINT: - ospfd_shutdown(); - /* NOTREACHED */ + die = 1; + /* FALLTHROUGH */ case SIGCHLD: if (check_child(ospfe_pid, "ospf engine")) { ospfe_pid = 0; -- cgit v1.2.3