shexecutor 0.0.17 → 0.0.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48b82b86ef73726ecd15e93f3536566b6fb1e31c
4
- data.tar.gz: a0d0a1a6e6949476f55c3f8647f7ff22eeef14fb
3
+ metadata.gz: 73745b3ef935c240d5712f017bc70c715db4d83f
4
+ data.tar.gz: 07e45a49417e94d555bc106f5563c6caa787990f
5
5
  SHA512:
6
- metadata.gz: 5ef689ba57ee3e5559d321a643d4a3ff6938ef8ceeb8feef02f488a938168a43885d60c9fe68904b7b8c19f643776a6435af84a6dcbd77984e129cbf02e9a24d
7
- data.tar.gz: 0a5e66484187ee989b13184d618bc9f9192fdb8a084a82002338e92bc542e5dd7b0983d1c987ca53d01f737b1dd85b788f4cafc4459dad4a555f017e9b7fb1de
6
+ metadata.gz: 5231082615df9d74fd8d9d6401767452420ef4da0e3fd9f459dde7bafcc6f0b32c524020e9344a419a021e7b402e3259c764d653da87fa401caf2c170b5419cc
7
+ data.tar.gz: 8665e98795b34ca56140ab4e6f490e850fada417a200dcba509d0fb090d20e8b5f86f67329915d0a871df1fa6e9956dd35b935a48e9d2e3b4fbab4ea092ce5ec
@@ -1,3 +1,3 @@
1
1
  module SHExecutor
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
data/lib/shexecutor.rb CHANGED
@@ -113,11 +113,8 @@ module SHExecutor
113
113
  end
114
114
  end
115
115
 
116
- # Warning! This method will block if you are not blocking!
117
- # Check status? before calling this to see if the process has completed if you do not want to block
118
116
  def flush
119
117
  return nil if @data_out.nil? or @data_err.nil?
120
- #store output for inspection
121
118
  stdout_data = @data_out.string
122
119
  stderr_data = @data_err.string
123
120
  @stdout = stdout_data if stdout_data != ""
@@ -158,7 +155,6 @@ module SHExecutor
158
155
  @t0 = nil
159
156
  Open3::popen3(application_path, options) do |stdin, stdout, stderr, thr|
160
157
  @t0 = thr
161
- # read stderr and stdout into buffers to prevent blocking
162
158
  t1 = Thread.new do
163
159
  begin
164
160
  IO.copy_stream(stdout, data_out)
@@ -177,9 +173,6 @@ module SHExecutor
177
173
  end
178
174
  m = Mutex.new
179
175
  done = false
180
- # track timeout if required. Do this ourselves since the mechanism
181
- # is simple and Timeout struggles from multi-threading issues.
182
- # IO.copy_stream stop the Timeout exception from being thrown properly.
183
176
  timedout = false
184
177
  t3 = Thread.new do
185
178
  count = 0
@@ -253,13 +246,6 @@ module SHExecutor
253
246
  end
254
247
  end
255
248
 
256
- def kill_9_process(pid)
257
- return if pid.nil?
258
- Process.kill(9, pid)
259
- rescue Errno::ESRCH
260
- #done
261
- end
262
-
263
249
  def kill_process(pid)
264
250
  return if pid.nil?
265
251
  Process.kill("TERM", pid)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shexecutor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan