fuxed_lock 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/fuxed_lock.rb +8 -3
- metadata +2 -2
data/lib/fuxed_lock.rb
CHANGED
@@ -49,7 +49,6 @@ module LibC
|
|
49
49
|
|
50
50
|
attach_function :popen, [:string, :string], :pointer
|
51
51
|
attach_function :pclose, [:pointer], :int # useless
|
52
|
-
attach_function :system, [:string], :int
|
53
52
|
end
|
54
53
|
|
55
54
|
module Kernel
|
@@ -69,7 +68,14 @@ module Kernel
|
|
69
68
|
end
|
70
69
|
|
71
70
|
def self.system(cmd)
|
72
|
-
|
71
|
+
io = self.popen(cmd)
|
72
|
+
io.sync = true
|
73
|
+
|
74
|
+
io.each_line {|line|
|
75
|
+
$stdout.puts line
|
76
|
+
}
|
77
|
+
|
78
|
+
io.close
|
73
79
|
end
|
74
80
|
end
|
75
81
|
|
@@ -80,4 +86,3 @@ end
|
|
80
86
|
def system(cmd)
|
81
87
|
Kernel.system(cmd)
|
82
88
|
end
|
83
|
-
|