test/run_neighbor_explorer: use ShutdownHandler to catch SIGINT/SIGTERM

This commit is contained in:
Max Kellermann 2018-06-04 17:42:47 +02:00
parent 03c89c9cec
commit 2ddd45e5e1
2 changed files with 3 additions and 0 deletions

View File

@ -1967,6 +1967,7 @@ if ENABLE_NEIGHBOR_PLUGINS
test_run_neighbor_explorer_SOURCES = \
src/Log.cxx src/LogBackend.cxx \
test/ShutdownHandler.cxx test/ShutdownHandler.hxx \
test/run_neighbor_explorer.cxx
test_run_neighbor_explorer_LDADD = $(AM_LDADD) \
$(NEIGHBOR_LIBS) \

View File

@ -24,6 +24,7 @@
#include "neighbor/Glue.hxx"
#include "fs/Path.hxx"
#include "event/Loop.hxx"
#include "ShutdownHandler.hxx"
#include "Log.hxx"
#include <stdio.h>
@ -68,6 +69,7 @@ try {
GlobalInit init;
EventLoop loop;
const ShutdownHandler shutdown_handler(loop);
/* read configuration file (mpd.conf) */