fuxed_lock 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
-
|