async-process 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 666f1e442c6185c4e77ae21c8c0033ce9ba30d04649f3b893d7e823c2aa157ae
4
- data.tar.gz: 6d4568ed5ff3da456748b480bf1ed559b91518012ef62c049f3de120dc2b755e
3
+ metadata.gz: 4463891d96186ffaabc950fb43a8784031b9a383ac37d98b1a318d08a3f6803b
4
+ data.tar.gz: a75a9a3282746bee3a5ff399a6a31cef7a88f9c884187e5226317effde9817ce
5
5
  SHA512:
6
- metadata.gz: cd99f72e74854e158a48e01a4de54452de521049c9b070eb1df293b5c58a6da11b92a40023944da91f660310b70b3f364d5bdeb3c46e402d51c6c320259de0b5
7
- data.tar.gz: 18de8e7d84d7b5804af4fa3fc24730a8620f37bf02da1380570ffe7b743975e0c0a26df21447c323539d1990da9702a1dd72aa69656e6384392cbda87f2aeb61
6
+ metadata.gz: fe570d03a1e40729796882f7562511a39b2ed9d4891e16d38da8cefb50e00412ce317aaead9bf4cc1f110f44d4c627880f0a8bbf6fa0b2acc55bc5d65a5ccd4d
7
+ data.tar.gz: baaea941dfbe47af1634d5a6df49374a41c6b9c90ce4a972d1aeba24e5d1ae4a7166dae05fa164a2a7f4779546acb649588748ae8883fdb92eed905685c84b9e
@@ -1,16 +1,16 @@
1
1
  language: ruby
2
- sudo: false
3
- dist: trusty
2
+ dist: xenial
4
3
  cache: bundler
4
+
5
5
  rvm:
6
- - 2.0
7
- - 2.1
8
- - 2.2
9
6
  - 2.3
10
7
  - 2.4
8
+ - 2.5
9
+ - 2.6
11
10
  - jruby-head
12
11
  - ruby-head
13
12
  - rbx-3
13
+
14
14
  matrix:
15
15
  allow_failures:
16
16
  - rvm: ruby-head
@@ -23,14 +23,15 @@ require 'async/io/generic'
23
23
  module Async
24
24
  module Process
25
25
  class Child
26
- def initialize(*args)
26
+ def initialize(*args, **options)
27
27
  # Setup a cross-thread notification pipe - nio4r can't monitor pids unfortunately:
28
28
  pipe = ::IO.pipe
29
29
  @input = Async::IO::Generic.new(pipe.first)
30
30
  @output = pipe.last
31
31
 
32
32
  @exit_status = nil
33
- @pid = ::Process.spawn(*args)
33
+
34
+ @pid = ::Process.spawn(*args, **options, pgroup: true)
34
35
 
35
36
  @thread = Thread.new do
36
37
  _, @exit_status = ::Process.wait2(@pid)
@@ -38,6 +39,8 @@ module Async
38
39
  end
39
40
  end
40
41
 
42
+ attr :pid
43
+
41
44
  def running?
42
45
  @exit_status.nil?
43
46
  end
@@ -58,7 +61,7 @@ module Async
58
61
  ensure
59
62
  # If the user stops this task, we kill the process:
60
63
  if @exit_status.nil?
61
- ::Process.kill(:TERM, @pid)
64
+ ::Process.kill(:TERM, -@pid)
62
65
  end
63
66
 
64
67
  @thread.join
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module Process
23
- VERSION = "1.1.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-process
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-19 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async