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.
Files changed (2) hide show
  1. data/lib/fuxed_lock.rb +8 -3
  2. 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
- LibC.system(cmd)
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
-
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - shura