aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/ltq-vdsl-app/patches/201-sigterm.patch
blob: 68a416ce24fb5fe4317debb092cd27ae5738e5b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/src/dsl_cpe_control.c
+++ b/src/dsl_cpe_control.c
@@ -6504,7 +6504,7 @@ DSL_CPE_STATIC  void DSL_CPE_Termination
    /* ignore the signal, we'll handle by ourself */
    signal (sig, SIG_IGN);
 
-   if (sig == SIGINT)
+   if (sig == SIGINT || sig == SIGTERM)
    {
       DSL_CCA_DEBUG(DSL_CCA_DBG_MSG, (DSL_CPE_PREFIX "terminated" DSL_CPE_CRLF));
       DSL_CPE_Termination ();
@@ -6756,6 +6756,7 @@ DSL_int_t dsl_cpe_daemon (
 
 #ifndef RTEMS
    signal (SIGINT, DSL_CPE_TerminationHandler);
+   signal (SIGTERM, DSL_CPE_TerminationHandler);
 #endif /* RTEMS*/
 
    /* Open DSL_CPE_MAX_DSL_ENTITIES devices*/