diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-18 13:40:07 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-18 13:40:07 +0300 |
commit | ecee62f204a93c7f512dce46657fbd101d155d78 (patch) | |
tree | d2fbe940bd94e7a93310651dceaf7c27e4866b75 /accel-pppd/main.c | |
parent | 862f1cbfe781098be2263443fc108a46f521a163 (diff) | |
download | accel-ppp-ecee62f204a93c7f512dce46657fbd101d155d78.tar.gz accel-ppp-ecee62f204a93c7f512dce46657fbd101d155d78.zip |
make termination caused by SIGTERM soft
Diffstat (limited to 'accel-pppd/main.c')
-rw-r--r-- | accel-pppd/main.c | 6 |
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; |