aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-08-10 15:28:31 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:01 -0800
commite25e52d9a8d3b789e2074a3924f8370e18fbd819 (patch)
tree91fa5d57707250c90d6825fce3893921d04ae420 /mpm/python
parent309a2f04e3da6667bc44c78121064b2d03e24e75 (diff)
downloaduhd-e25e52d9a8d3b789e2074a3924f8370e18fbd819.tar.gz
uhd-e25e52d9a8d3b789e2074a3924f8370e18fbd819.tar.bz2
uhd-e25e52d9a8d3b789e2074a3924f8370e18fbd819.zip
mpm: Catch multiprocess exception on exit
Diffstat (limited to 'mpm/python')
-rwxr-xr-xmpm/python/usrp_hwd.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py
index 5a1457e1d..48af28d36 100755
--- a/mpm/python/usrp_hwd.py
+++ b/mpm/python/usrp_hwd.py
@@ -22,6 +22,7 @@ from __future__ import print_function
import sys
import argparse
from gevent import signal
+from gevent.hub import BlockingSwitchOutError
import usrp_mpm as mpm
from usrp_mpm.mpmtypes import SharedState
from usrp_mpm.periph_manager import periph_manager
@@ -95,7 +96,11 @@ def kill_time(sig, frame):
proc.terminate()
log.info("Terminating pid: {0}".format(proc.pid))
for proc in _PROCESSES:
- proc.join()
+ try:
+ proc.join()
+ except BlockingSwitchOutError:
+ log.debug("Caught BlockingSwitchOutError for {}".format(str(proc)))
+ pass
log.info("System exiting")
sys.exit(0)