From e25e52d9a8d3b789e2074a3924f8370e18fbd819 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 10 Aug 2017 15:28:31 -0700 Subject: mpm: Catch multiprocess exception on exit --- mpm/python/usrp_hwd.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mpm/python') 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) -- cgit v1.2.3