summaryrefslogtreecommitdiff
path: root/accel-pppd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/main.c')
-rw-r--r--accel-pppd/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/main.c b/accel-pppd/main.c
index 9eb08e10..b908fbc6 100644
--- a/accel-pppd/main.c
+++ b/accel-pppd/main.c
@@ -21,10 +21,11 @@
#include "triton/triton.h"
-#include "memdebug.h"
#include "log.h"
#include "events.h"
+#include "ap_session.h"
#include "backup.h"
+#include "memdebug.h"
#ifndef ARG_MAX
#define ARG_MAX 128*1024
@@ -335,6 +336,9 @@ int main(int _argc, char **_argv)
sigwait(&set, &sig);
log_info1("terminate, sig = %i\n", sig);
+ if (ap_shutdown_soft(NULL, 1) == 0)
+ sigwait(&set, &sig);
+
triton_terminate();
return EXIT_SUCCESS;