parent
aeee2a5ea1
commit
b1847063b1
@ -0,0 +1,32 @@
|
||||
From 43da65cd2af00d8e7162461835b039bc5ee7d5c8 Mon Sep 17 00:00:00 2001
|
||||
From: Bernhard Furtmueller <furti@1012surf.net>
|
||||
Date: Tue, 23 Jun 2009 23:18:01 +0200
|
||||
Subject: [PATCH] Fixed #2355 read hang on /proc/xen/capabilties on RHEL 4.7
|
||||
Signed-off-by: Bernhard Furtmueller <furti@1012surf.net>
|
||||
|
||||
---
|
||||
lib/facter/virtual.rb | 8 +++++---
|
||||
1 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
|
||||
index 72bfe51..8c11b40 100644
|
||||
--- a/lib/facter/virtual.rb
|
||||
+++ b/lib/facter/virtual.rb
|
||||
@@ -41,9 +41,11 @@ Facter.add("virtual") do
|
||||
end
|
||||
|
||||
if FileTest.exists?("/proc/xen/capabilities")
|
||||
- txt = File.read("/proc/xen/capabilities")
|
||||
- if txt =~ /control_d/i
|
||||
- result = "xen0"
|
||||
+ Thread::exclusive do
|
||||
+ txt = File.read("/proc/xen/capabilities")
|
||||
+ if txt =~ /control_d/i
|
||||
+ result = "xen0"
|
||||
+ end
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
1.6.0.4
|
||||
|
@ -0,0 +1 @@
|
||||
facter-1_5_5-3_fc11:HEAD:facter-1.5.5-3.fc11.src.rpm:1250117897
|
Loading…
Reference in new issue