diff options
author | 2005-04-13 21:15:36 +0000 | |
---|---|---|
committer | 2005-04-13 21:15:36 +0000 | |
commit | 867a128233e479d1c8cdc15f17330dbe6c5148b1 (patch) | |
tree | 30fb0e92b4c6745b37a7e38ee999698cb724f51c /usr.sbin/hostapd/privsep.c | |
parent | a daemon, not an daemon; (diff) | |
download | wireguard-openbsd-867a128233e479d1c8cdc15f17330dbe6c5148b1.tar.xz wireguard-openbsd-867a128233e479d1c8cdc15f17330dbe6c5148b1.zip |
un-hack, use event_loopexit()
ok henning@ brad@
Diffstat (limited to 'usr.sbin/hostapd/privsep.c')
-rw-r--r-- | usr.sbin/hostapd/privsep.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/hostapd/privsep.c b/usr.sbin/hostapd/privsep.c index 849be5a868a..f4221208709 100644 --- a/usr.sbin/hostapd/privsep.c +++ b/usr.sbin/hostapd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.8 2005/04/13 21:02:44 moritz Exp $ */ +/* $OpenBSD: privsep.c,v 1.9 2005/04/13 21:15:36 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -69,9 +69,6 @@ void hostapd_must_write(int, void *, size_t); static int priv_fd = -1; static volatile pid_t child_pid = -1; -/* defined in event(3) to terminate the event loop */ -extern volatile sig_atomic_t event_gotterm; - /* * Main privsep functions */ @@ -377,13 +374,17 @@ hostapd_sig_relay(int sig) void hostapd_sig_chld(int sig) { + struct timeval tv; + + tv.tv_sec = 0; + tv.tv_usec = 0; + /* * If parent gets a SIGCHLD, it will exit. */ if (sig == SIGCHLD) { - /* This will terminate libevent's main loop */ - event_gotterm = 1; + event_loopexit(&tv); } } |