Author: kroosec
Date: 2016-10-13 20:24:06 +0200 (Thu, 13 Oct 2016)
New Revision: 26403

Modified:
   trunk/openvas-scanner/ChangeLog
   trunk/openvas-scanner/src/openvassd.c
Log:
* src/openvassd.c (loading_handler_stop): Call terminate_process().
Handles a race condition where the scanner tries to terminate the
loading handler process before the later has set the signal handler.

Modified: trunk/openvas-scanner/ChangeLog
===================================================================
--- trunk/openvas-scanner/ChangeLog     2016-10-13 14:40:24 UTC (rev 26402)
+++ trunk/openvas-scanner/ChangeLog     2016-10-13 18:24:06 UTC (rev 26403)
@@ -1,3 +1,9 @@
+2016-10-13  Hani Benhabiles  <hani.benhabi...@greenbone.net>
+
+       * src/openvassd.c (loading_handler_stop): Call terminate_process().
+       Handles a race condition where the scanner tries to terminate the
+       loading handler process before the later has set the signal handler.
+
 2016-10-13  Timo Pollmeier <timo.pollme...@greenbone.net>
 
        * tools/greenbone-nvt-sync.in (do_wget_community_feed): Log error and

Modified: trunk/openvas-scanner/src/openvassd.c
===================================================================
--- trunk/openvas-scanner/src/openvassd.c       2016-10-13 14:40:24 UTC (rev 
26402)
+++ trunk/openvas-scanner/src/openvassd.c       2016-10-13 18:24:06 UTC (rev 
26403)
@@ -325,10 +325,7 @@
 void
 loading_handler_stop (pid_t handler_pid)
 {
-  int status;
-
-  kill (handler_pid, SIGTERM);
-  waitpid (handler_pid, &status, 0);
+  terminate_process (handler_pid);
   destroy_loading_shm ();
 }
 

_______________________________________________
Openvas-commits mailing list
Openvas-commits@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-commits

Reply via email to