summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ovs/daemon.py2
-rw-r--r--tools/tasks.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ovs/daemon.py b/src/ovs/daemon.py
index ee3446d5..323644c6 100644
--- a/src/ovs/daemon.py
+++ b/src/ovs/daemon.py
@@ -138,5 +138,5 @@ class VSwitchd(tasks.Process):
:returns: None
"""
if self._ovsdb_pid:
- tasks.run_task(['sudo', 'kill', '-2', str(self._ovsdb_pid)],
+ tasks.run_task(['sudo', 'kill', '-15', str(self._ovsdb_pid)],
self._logger, 'Killing ovsdb-server...')
diff --git a/tools/tasks.py b/tools/tasks.py
index f8f11d4e..555a5929 100644
--- a/tools/tasks.py
+++ b/tools/tasks.py
@@ -23,6 +23,7 @@ import threading
import sys
import os
import locale
+import time
from conf import settings
@@ -244,8 +245,10 @@ class Process(object):
"""Kill process instance if it is alive.
"""
if self._child and self._child.isalive():
- run_task(['sudo', 'kill', '-2', str(self._child.pid)],
+ run_task(['sudo', 'kill', '-15', str(self._child.pid)],
self._logger)
+ self._logger.debug('Wait for process to terminate')
+ time.sleep(2)
if self.is_relinquished():
self._relinquish_thread.join()