summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-02-28 19:17:07 +0000
committerGerrit Code Review <review@openstack.org>2012-02-28 19:17:07 +0000
commitd034c7838e2bb22a9451446e922eb67e78aba7b1 (patch)
tree88f091753d5644085eac2f755afe3ba15ef0b142 /nova/utils.py
parent9d6d72deb0b9241b924909e86ec9a54aacda4bf4 (diff)
parent6e6ef5589e8898f898b0d986db90e1e2356e889f (diff)
downloadnova-d034c7838e2bb22a9451446e922eb67e78aba7b1.tar.gz
nova-d034c7838e2bb22a9451446e922eb67e78aba7b1.tar.xz
nova-d034c7838e2bb22a9451446e922eb67e78aba7b1.zip
Merge "OS X Support fixed, bug 942352"
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py
index ef4932146..2b39b70af 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -903,10 +903,13 @@ def cleanup_file_locks():
pid = match.group(1)
LOG.debug(_('Found sentinel %(filename)s for pid %(pid)s' %
{'filename': filename, 'pid': pid}))
- if not os.path.exists(os.path.join('/proc', pid)):
+ try:
+ os.kill(int(pid), 0)
+ except OSError, e:
+ # PID wasn't found
delete_if_exists(os.path.join(FLAGS.lock_path, filename))
LOG.debug(_('Cleaned sentinel %(filename)s for pid %(pid)s' %
- {'filename': filename, 'pid': pid}))
+ {'filename': filename, 'pid': pid}))
# cleanup lock files
for filename in files: