grntest 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afb75de0224879e3c0a183831ba799d6fed9b311
4
- data.tar.gz: 2dae34d806dcf6e593ef6681051fe355d23dd383
3
+ metadata.gz: 73a811783d638c6d6acf4eeb84a0308dbda6903b
4
+ data.tar.gz: e29b281351b0b295150c5959f33c3f3ff4d80d1c
5
5
  SHA512:
6
- metadata.gz: 438db144e528162b0535b39fc32c8cade5e3d2a3f862e028b0240b43876fcb94552b261819a13608033914d61932a34ed07a829005757cacd8d61c9c323e75a7
7
- data.tar.gz: 87916adbfb3c98d226987355f34ea2cb8d87776bd09bdd36c640ac46b88448eb27a8e6014eb20fbb7344ae2d9fa94fdd2048a04a4f5aa145e50b9e713885c65c
6
+ metadata.gz: 6897f2f50d59801a4e3845f25e71011bd8971677858e8cea720377008e10ae7bfbd9eea5c00fe66e6b21f8b8e4ae7af56223772436601006cfa4bf2144595251
7
+ data.tar.gz: c480933411acfac80d1d3cac6bf2212eb78b5e58fadfaf0482b11ce61af89e94e71c10ee2766c9bb2a6783c6c07487f56a5355ef4248bfa9bbfaac3afc7835f5
data/doc/text/news.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.2.2: 2016-05-18
4
+
5
+ ### Improvements
6
+
7
+ * Improved shutdown process on error.
8
+
3
9
  ## 1.2.1: 2016-05-18
4
10
 
5
11
  ### Fixes
@@ -381,14 +381,20 @@ call chdir("#{context.temporary_directory_path}")
381
381
  def ensure_process_finished(pid)
382
382
  return if pid.nil?
383
383
 
384
- n_retries = 0
385
- loop do
386
- finished_pid = Process.waitpid(pid, Process::WNOHANG)
387
- break if finished_pid
388
- n_retries += 1
389
- break if n_retries > 100
390
- Process.kill(:TERM, pid)
391
- sleep(0.1)
384
+ [:TERM, :KILL].each do |signal|
385
+ n_retries = 0
386
+ loop do
387
+ finished_pid = Process.waitpid(pid, Process::WNOHANG)
388
+ return if finished_pid
389
+ n_retries += 1
390
+ return if n_retries > 100
391
+ begin
392
+ Process.kill(signal, pid)
393
+ rescue SystemCallError
394
+ $stderr.puts("#{signal} -> #{pid}: #{$!.class}: #{$!}")
395
+ end
396
+ sleep(0.1)
397
+ end
392
398
  end
393
399
  end
394
400
 
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.2.1"
17
+ VERSION = "1.2.2"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grntest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou