diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-02-16 16:47:39 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-02-16 16:47:39 +0000 |
commit | f01896e62672f71b04798c83752b36ccb628db67 (patch) | |
tree | 84e433393cb4baedb6d8375a764a165e5dd74f1f | |
parent | e9b7e730d6efab10f5cc0e7b582e95098b9db881 (diff) | |
download | morph-f01896e62672f71b04798c83752b36ccb628db67.tar.gz |
scripts/distbuild: Ensure process names are unique
Previously, duplicate names would cause the ProcessMonitor class to
forget about processes, and leave them running after the process exits.
-rwxr-xr-x | scripts/distbuild | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/distbuild b/scripts/distbuild index 2f0e666e..df4e4dea 100755 --- a/scripts/distbuild +++ b/scripts/distbuild @@ -223,6 +223,9 @@ class ProcessMonitor(object): def watch(self, process): '''Start monitoring a running process.''' + if process.name in self.process: + raise KeyError('Already watching a process named %s.' % + process.name) self.process[process.name] = process def check_all(self): |