Author: kroosec
Date: 2016-10-13 20:27:02 +0200 (Thu, 13 Oct 2016)
New Revision: 26404

Modified:
   branches/openvas-scanner-5.0/ChangeLog
   branches/openvas-scanner-5.0/src/openvassd.c
Log:
Backport r26403.

* 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: branches/openvas-scanner-5.0/ChangeLog
===================================================================
--- branches/openvas-scanner-5.0/ChangeLog      2016-10-13 18:24:06 UTC (rev 
26403)
+++ branches/openvas-scanner-5.0/ChangeLog      2016-10-13 18:27:02 UTC (rev 
26404)
@@ -1,3 +1,11 @@
+2016-10-13  Hani Benhabiles  <hani.benhabi...@greenbone.net>
+
+       Backport r26403.
+
+       * 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-12  Hani Benhabiles  <hani.benhabi...@greenbone.net>
 
        * src/pluginscheduler.c (plugin_next_unrun_dependency): Get oid from

Modified: branches/openvas-scanner-5.0/src/openvassd.c
===================================================================
--- branches/openvas-scanner-5.0/src/openvassd.c        2016-10-13 18:24:06 UTC 
(rev 26403)
+++ branches/openvas-scanner-5.0/src/openvassd.c        2016-10-13 18:27:02 UTC 
(rev 26404)
@@ -329,10 +329,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