Ignoring SIGCHLD signal as exit status if child process is not required. 07/135907/1 accepted/tizen/unified/20170628.164020 submit/tizen/20170628.081621
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 27 Jun 2017 08:49:33 +0000 (14:19 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Tue, 27 Jun 2017 08:49:33 +0000 (14:19 +0530)
Description: This patch ignores the SIGCHLD event, so that kernel can
reap the child process automatically so that process table is properly updated.

Change-Id: I09283dbee630359a5daa5c2d25f97a65ac6dda3e
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/stc-manager.spec
src/stc-manager.c

index f9ff828..d9ab976 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.17
+Version:    0.0.18
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 6af6b7b..a732b72 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <signal.h>
 #include "stc-manager.h"
 #include "stc-emulator.h"
 #include "stc-statistics.h"
@@ -89,6 +90,8 @@ gint32 main(gint32 argc, gchar *argv[])
        GMainLoop *main_loop = NULL;
        gint32 ret = -1;
 
+       signal(SIGCHLD, SIG_IGN);
+
        STC_LOGI("Smart Traffic Control Manager");
 
        if (daemon(0, 0) != 0)