childprocess 0.8.0 → 2.0.0

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.
Files changed (51) hide show
  1. checksums.yaml +5 -5
  2. data/.document +6 -6
  3. data/.gitignore +28 -28
  4. data/.rspec +1 -1
  5. data/.travis.yml +42 -36
  6. data/CHANGELOG.md +67 -44
  7. data/Gemfile +18 -15
  8. data/LICENSE +20 -20
  9. data/README.md +216 -192
  10. data/Rakefile +61 -61
  11. data/appveyor.yml +42 -43
  12. data/childprocess.gemspec +32 -30
  13. data/ext/mkrf_conf.rb +24 -0
  14. data/lib/childprocess/abstract_io.rb +36 -36
  15. data/lib/childprocess/abstract_process.rb +192 -192
  16. data/lib/childprocess/errors.rb +37 -26
  17. data/lib/childprocess/jruby/io.rb +16 -16
  18. data/lib/childprocess/jruby/process.rb +184 -159
  19. data/lib/childprocess/jruby/pump.rb +53 -53
  20. data/lib/childprocess/jruby.rb +56 -56
  21. data/lib/childprocess/tools/generator.rb +145 -145
  22. data/lib/childprocess/unix/fork_exec_process.rb +78 -70
  23. data/lib/childprocess/unix/io.rb +21 -21
  24. data/lib/childprocess/unix/lib.rb +186 -186
  25. data/lib/childprocess/unix/platform/i386-linux.rb +12 -12
  26. data/lib/childprocess/unix/platform/i386-solaris.rb +11 -11
  27. data/lib/childprocess/unix/platform/x86_64-linux.rb +12 -12
  28. data/lib/childprocess/unix/platform/x86_64-macosx.rb +11 -11
  29. data/lib/childprocess/unix/posix_spawn_process.rb +134 -134
  30. data/lib/childprocess/unix/process.rb +90 -89
  31. data/lib/childprocess/unix.rb +9 -9
  32. data/lib/childprocess/version.rb +3 -3
  33. data/lib/childprocess/windows/handle.rb +91 -91
  34. data/lib/childprocess/windows/io.rb +25 -25
  35. data/lib/childprocess/windows/lib.rb +416 -416
  36. data/lib/childprocess/windows/process.rb +130 -130
  37. data/lib/childprocess/windows/process_builder.rb +178 -175
  38. data/lib/childprocess/windows/structs.rb +148 -148
  39. data/lib/childprocess/windows.rb +33 -33
  40. data/lib/childprocess.rb +210 -205
  41. data/spec/abstract_io_spec.rb +12 -12
  42. data/spec/childprocess_spec.rb +447 -391
  43. data/spec/get_env.ps1 +13 -0
  44. data/spec/io_spec.rb +228 -228
  45. data/spec/jruby_spec.rb +24 -24
  46. data/spec/pid_behavior.rb +12 -12
  47. data/spec/platform_detection_spec.rb +86 -86
  48. data/spec/spec_helper.rb +270 -261
  49. data/spec/unix_spec.rb +57 -57
  50. data/spec/windows_spec.rb +23 -23
  51. metadata +18 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fc6ebd5fca28a63f0cc66f1694f31961aa8dbd59
4
- data.tar.gz: 0a3a042ae2fa14dc9b70446553f296cedd4990f4
2
+ SHA256:
3
+ metadata.gz: 02b58bb5f5d2ed76658b0d6c8f5d8e8fe88cfcfbfaf725c71192505186a61981
4
+ data.tar.gz: 5ba37a1132b070d75002f48aeb8f140f7244011219079a50de455fb4c538a00b
5
5
  SHA512:
6
- metadata.gz: 721fae3f6625d89823fcc87fbc2188d611cb4b0f120b26a7bd4ddc2c421d4791dc608dbfe90275a312a920d3620ec377e463d01a6b118bb3f2cf938230cd4f65
7
- data.tar.gz: 1a1f9e46433a97dc71e2937c6270f775d0c82db387daea194011eb83befde3e96912b83adbb472efbe03a381b7ac8a41e9009546c7157083f93c78738eeab6d6
6
+ metadata.gz: 9fb100ea7f324ec173d78230345efd9e5d9650d3a9b064a74e297174709830e04eea1c9b442d6a91c3883fddf650445bf766c6d3a1a9b6112ec5dc32a504c5cb
7
+ data.tar.gz: ca02c5272f09358e0361b0fb98cd60b8de5281cc1d98887b04e261aa11c30e2f5aa557b66f5305c454f5c820a3655e539411d7f188a6f9faa59bc4e5c6f8a5d3
data/.document CHANGED
@@ -1,6 +1,6 @@
1
- README.rdoc
2
- lib/**/*.rb
3
- bin/*
4
- features/**/*.feature
5
- -
6
- LICENSE
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ -
6
+ LICENSE
data/.gitignore CHANGED
@@ -1,28 +1,28 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## RubyMine
17
- .idea/*
18
-
19
- ## PROJECT::GENERAL
20
- coverage
21
- rdoc
22
- pkg
23
- .rbx
24
- Gemfile.lock
25
- .ruby-version
26
- .bundle
27
-
28
- ## PROJECT::SPECIFIC
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## RubyMine
17
+ .idea/*
18
+
19
+ ## PROJECT::GENERAL
20
+ coverage
21
+ rdoc
22
+ pkg
23
+ .rbx
24
+ Gemfile.lock
25
+ .ruby-version
26
+ .bundle
27
+
28
+ ## PROJECT::SPECIFIC
data/.rspec CHANGED
@@ -1 +1 @@
1
- --color
1
+ --color
data/.travis.yml CHANGED
@@ -1,36 +1,42 @@
1
- os:
2
- - linux
3
- - osx
4
-
5
- rvm:
6
- - 1.9.3
7
- - jruby-9.1.9.0
8
- - rbx-3
9
- - 2.0.0
10
- - 2.1
11
- - 2.2
12
- - 2.3.5
13
- - 2.4.0
14
- - ruby-head
15
-
16
- sudo: true # Necessary to fix JRuby
17
-
18
- cache: bundler
19
-
20
- before_install:
21
- - "echo 'gem: --no-document' > ~/.gemrc"
22
- - gem update --system
23
- - gem install bundler # Necessary to fix 1.9.3
24
-
25
- env:
26
- global:
27
- matrix:
28
- - CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
29
- - CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
30
-
31
- matrix:
32
- allow_failures:
33
- - rvm: rbx-3
34
- - rvm: jruby-9.1.9.0
35
- - rvm: ruby-head
36
- - env: "CHILDPROCESS_POSIX_SPAWN=true"
1
+ os:
2
+ - linux
3
+ - osx
4
+
5
+ rvm:
6
+ - jruby-9.1.9.0
7
+ - rbx-3
8
+ - 2.3
9
+ - 2.4
10
+ - 2.5
11
+ - 2.6
12
+ - ruby-head
13
+
14
+ sudo: false
15
+
16
+ cache: bundler
17
+
18
+ before_install:
19
+ - "echo 'gem: --no-document' > ~/.gemrc"
20
+ # RubyGems update is supported for Ruby 2.3 and later
21
+ - ruby -e "system('gem update --system') if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3')"
22
+ - gem install bundler --version '~> 1.17'
23
+
24
+ before_script:
25
+ - 'export JAVA_OPTS="${JAVA_OPTS_FOR_SPECS}"'
26
+
27
+ env:
28
+ global:
29
+ matrix:
30
+ - CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
31
+ - CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
32
+
33
+ matrix:
34
+ allow_failures:
35
+ - rvm: rbx-3
36
+ - rvm: jruby-9.1.9.0
37
+ - rvm: ruby-head
38
+ - env: "CHILDPROCESS_POSIX_SPAWN=true"
39
+ include:
40
+ - rvm: jruby-9.2.5.0
41
+ jdk: openjdk11
42
+ env: "JAVA_OPTS_FOR_SPECS='--add-opens java.base/java.io=org.jruby.dist --add-opens java.base/sun.nio.ch=org.jruby.dist'"
data/CHANGELOG.md CHANGED
@@ -1,44 +1,67 @@
1
- ### Version 0.8.0 / 2017-09-23
2
-
3
- * Added a method for determining whether or nto a process had been started.
4
-
5
-
6
- ### Version 0.7.1 / 2017-06-26
7
-
8
- * Fixed a noisy uninitialized variable warning
9
-
10
-
11
- ### Version 0.7.0 / 2017-05-07
12
-
13
- * Debugging information now uses a Logger, which can be configured.
14
-
15
-
16
- ### Version 0.6.3 / 2017-03-24
17
-
18
- See beta release notes.
19
-
20
-
21
- ### Version 0.6.3.beta.1 / 2017-03-10
22
-
23
- * Bug fix: Fixed child process creation problems on Windows 7 when a child was declared as a leader.
24
-
25
-
26
- ### Version 0.6.2 / 2017-02-25
27
-
28
- * Bug fix: Fixed a potentially broken edge case that could occur on older 32-bit OSX systems.
29
-
30
-
31
- ### Version 0.6.1 / 2017-01-22
32
-
33
- * Bug fix: Fixed a dependency that was accidentally declared as a runtime
34
- dependency instead of a development dependency.
35
-
36
-
37
- ### Version 0.6.0 / 2017-01-22
38
-
39
- * Support for Ruby 2.4 added
40
-
41
-
42
- ### Version 0.5.9 / 2016-01-06
43
-
44
- * The Great Before Times...
1
+ ### Version 2.0.0 / 2019-07-11
2
+
3
+ * [#148](https://github.com/enkessler/childprocess/pull/148): Drop support for Ruby 2.0, 2.1, and 2.2
4
+ * [#149](https://github.com/enkessler/childprocess/pull/149): Fix Unix fork reopen to be compatible with Ruby 2.6
5
+ * [#152](https://github.com/enkessler/childprocess/pull/152)/[#154](https://github.com/enkessler/childprocess/pull/154): Fix hangs and permission errors introduced in Ruby 2.6 for leader processes of process groups
6
+
7
+ ### Version 1.0.1 / 2019-02-03
8
+
9
+ * [#143](https://github.com/enkessler/childprocess/pull/144): Fix installs by adding `rake` gem as runtime dependency
10
+ * [#147](https://github.com/enkessler/childprocess/pull/147): Relax `rake` gem constraint from `< 12` to `< 13`
11
+
12
+ ### Version 1.0.0 / 2019-01-28
13
+
14
+ * [#134](https://github.com/enkessler/childprocess/pull/134): Add support for non-ASCII characters on Windows
15
+ * [#132](https://github.com/enkessler/childprocess/pull/132): Install `ffi` gem requirement on Windows only
16
+ * [#128](https://github.com/enkessler/childprocess/issues/128): Convert environment variable values to strings when `posix_spawn` enabled
17
+ * [#141](https://github.com/enkessler/childprocess/pull/141): Support JRuby on Java >= 9
18
+
19
+ ### Version 0.9.0 / 2018-03-10
20
+
21
+ * Added support for DragonFly BSD.
22
+
23
+
24
+ ### Version 0.8.0 / 2017-09-23
25
+
26
+ * Added a method for determining whether or not a process had been started.
27
+
28
+
29
+ ### Version 0.7.1 / 2017-06-26
30
+
31
+ * Fixed a noisy uninitialized variable warning
32
+
33
+
34
+ ### Version 0.7.0 / 2017-05-07
35
+
36
+ * Debugging information now uses a Logger, which can be configured.
37
+
38
+
39
+ ### Version 0.6.3 / 2017-03-24
40
+
41
+ See beta release notes.
42
+
43
+
44
+ ### Version 0.6.3.beta.1 / 2017-03-10
45
+
46
+ * Bug fix: Fixed child process creation problems on Windows 7 when a child was declared as a leader.
47
+
48
+
49
+ ### Version 0.6.2 / 2017-02-25
50
+
51
+ * Bug fix: Fixed a potentially broken edge case that could occur on older 32-bit OSX systems.
52
+
53
+
54
+ ### Version 0.6.1 / 2017-01-22
55
+
56
+ * Bug fix: Fixed a dependency that was accidentally declared as a runtime
57
+ dependency instead of a development dependency.
58
+
59
+
60
+ ### Version 0.6.0 / 2017-01-22
61
+
62
+ * Support for Ruby 2.4 added
63
+
64
+
65
+ ### Version 0.5.9 / 2016-01-06
66
+
67
+ * The Great Before Times...
data/Gemfile CHANGED
@@ -1,15 +1,18 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in child_process.gemspec
4
- gemspec
5
-
6
-
7
- if RUBY_VERSION =~ /^1\./
8
- gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
9
- gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
10
- gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
11
-
12
- if RbConfig::CONFIG['host_os'].downcase =~ /mswin|msys|mingw32/
13
- gem 'ffi', '< 1.9.15' # The 'ffi' gem, for Windows, requires Ruby 2.x on/after this version
14
- end
15
- end
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in child_process.gemspec
4
+ gemspec
5
+
6
+ if RUBY_VERSION =~ /^1\./
7
+ gem 'tins', '< 1.7' # The 'tins' gem requires Ruby 2.x on/after this version
8
+ gem 'json', '< 2.0' # The 'json' gem drops pre-Ruby 2.x support on/after this version
9
+ gem 'term-ansicolor', '< 1.4' # The 'term-ansicolor' gem requires Ruby 2.x on/after this version
10
+
11
+ # ffi gem for Windows requires Ruby 2.x on/after this version
12
+ gem 'ffi', '< 1.9.15' if ENV['CHILDPROCESS_POSIX_SPAWN'] == 'true' || Gem.win_platform?
13
+ elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2')
14
+ # Ruby 2.0/2.1 support only ffi before 1.10
15
+ gem 'ffi', '~> 1.9.0' if ENV['CHILDPROCESS_POSIX_SPAWN'] == 'true' || Gem.win_platform?
16
+ else
17
+ gem 'ffi' if ENV['CHILDPROCESS_POSIX_SPAWN'] == 'true' || Gem.win_platform?
18
+ end
data/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2010-2015 Jari Bakken
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2010-2015 Jari Bakken
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.