diff options
Diffstat (limited to 'src/buildstream/_cas/cascache.py')
-rw-r--r-- | src/buildstream/_cas/cascache.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py index 80ff87a9e..a62bc3d44 100644 --- a/src/buildstream/_cas/cascache.py +++ b/src/buildstream/_cas/cascache.py @@ -1088,8 +1088,11 @@ class _CASCacheUsageMonitor: # This can't be allowed with background threads or open gRPC channels. assert utils._is_single_threaded() and not cas.has_open_grpc_channels() - self._subprocess = multiprocessing.Process(target=self._subprocess_run) - self._subprocess.start() + # Block SIGINT, we don't want to kill the process when we interrupt the frontend + # and this process if very lightweight. + with _signals.blocked([signal.SIGINT], ignore=False): + self._subprocess = multiprocessing.Process(target=self._subprocess_run) + self._subprocess.start() def get_cache_usage(self): disk_usage = self._disk_usage.value |