exceptional_fork 1.2.0 → 1.2.1

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: 6ab22c22f6a3441848a352c6dc0ae33b899e9d9c
4
- data.tar.gz: 83c5ce7dd6da50a819974df9ced0dbd57a8127e4
3
+ metadata.gz: 0db67580e687ae0089a9db1b53be076642ab4f7d
4
+ data.tar.gz: 724c78595f565a34b0f9049f3cfa0a8a9b2018d8
5
5
  SHA512:
6
- metadata.gz: 8e26f513d002378e533be2cba1e0221fc0d174782351f0b9e7e23921f09f6d183962d9d7aff4a08376f358e6179094d87de14c7cf89ffdec23d2146c967d8892
7
- data.tar.gz: d8ae3caa7edc189dd4103729c466bfd704bedb4052355294c2b5acf1c8e3ef3b36599e7f0a94f4c25400834ffceb48b6d8fe7c1d9ef667e691a1801198a497be
6
+ metadata.gz: f4bb138873fd2f3df438362527c2338484bef97b422640f0a2cce68879e2f99696444097b602fd73531f19ba2881b1f5e9f1631c91881085714e5920bdea1a70
7
+ data.tar.gz: d57235725c29bbf1c19133ef9ca3f6066bde036191d4f2c6e36072d8e544a240e0aeec7157715b99b2f3ec752bf3b6121dc3221e2eb99d93d47d419567f0394d
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: exceptional_fork 1.2.0 ruby lib
5
+ # stub: exceptional_fork 1.2.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "exceptional_fork"
9
- s.version = "1.2.0"
9
+ s.version = "1.2.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -1,5 +1,5 @@
1
1
  module ExceptionalFork
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  QUIT = "The child process %d has quit or was killed abruptly. No error information could be retrieved".freeze
4
4
  ProcessHung = Class.new(StandardError)
5
5
  DEFAULT_TIMEOUT = 10
@@ -97,8 +97,8 @@ module ExceptionalFork
97
97
  # be able to do other work _but_ we might be waiting indefinitely. If we use
98
98
  # a non-blocking option we can supply a timeout and force-quit the process
99
99
  # without using the Timeout module (and conversely having an overhead of 1
100
- # watcher thread per child spawned)
101
- if wait_res = Process.wait2(pid, Process::WNOHANG)
100
+ # watcher thread per child spawned).
101
+ if wait_res = Process.wait2(pid, Process::WNOHANG | Process::WUNTRACED)
102
102
  _, status = wait_res
103
103
  return status.exitstatus || DEFAULT_ERROR_STATUS
104
104
  else
@@ -27,7 +27,7 @@ describe "ExceptionalFork" do
27
27
  it "kills a process that takes too long to terminate" do
28
28
  expect(Process).to receive(:fork).and_call_original
29
29
  expect {
30
- ExceptionalFork.fork_and_wait(1) { sleep 5; raise "Should never ever get here" }
30
+ ExceptionalFork.fork_and_wait(1) { sleep 20; raise "Should never ever get here" }
31
31
  }.to raise_error(ExceptionalFork::ProcessHung)
32
32
  end
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exceptional_fork
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov