childprocess 0.8.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.document +6 -6
- data/.gitignore +28 -28
- data/.rspec +1 -1
- data/.travis.yml +42 -36
- data/CHANGELOG.md +67 -44
- data/Gemfile +18 -15
- data/LICENSE +20 -20
- data/README.md +216 -192
- data/Rakefile +61 -61
- data/appveyor.yml +42 -43
- data/childprocess.gemspec +32 -30
- data/ext/mkrf_conf.rb +24 -0
- data/lib/childprocess/abstract_io.rb +36 -36
- data/lib/childprocess/abstract_process.rb +192 -192
- data/lib/childprocess/errors.rb +37 -26
- data/lib/childprocess/jruby/io.rb +16 -16
- data/lib/childprocess/jruby/process.rb +184 -159
- data/lib/childprocess/jruby/pump.rb +53 -53
- data/lib/childprocess/jruby.rb +56 -56
- data/lib/childprocess/tools/generator.rb +145 -145
- data/lib/childprocess/unix/fork_exec_process.rb +78 -70
- data/lib/childprocess/unix/io.rb +21 -21
- data/lib/childprocess/unix/lib.rb +186 -186
- data/lib/childprocess/unix/platform/i386-linux.rb +12 -12
- data/lib/childprocess/unix/platform/i386-solaris.rb +11 -11
- data/lib/childprocess/unix/platform/x86_64-linux.rb +12 -12
- data/lib/childprocess/unix/platform/x86_64-macosx.rb +11 -11
- data/lib/childprocess/unix/posix_spawn_process.rb +134 -134
- data/lib/childprocess/unix/process.rb +90 -89
- data/lib/childprocess/unix.rb +9 -9
- data/lib/childprocess/version.rb +3 -3
- data/lib/childprocess/windows/handle.rb +91 -91
- data/lib/childprocess/windows/io.rb +25 -25
- data/lib/childprocess/windows/lib.rb +416 -416
- data/lib/childprocess/windows/process.rb +130 -130
- data/lib/childprocess/windows/process_builder.rb +178 -175
- data/lib/childprocess/windows/structs.rb +148 -148
- data/lib/childprocess/windows.rb +33 -33
- data/lib/childprocess.rb +210 -205
- data/spec/abstract_io_spec.rb +12 -12
- data/spec/childprocess_spec.rb +447 -391
- data/spec/get_env.ps1 +13 -0
- data/spec/io_spec.rb +228 -228
- data/spec/jruby_spec.rb +24 -24
- data/spec/pid_behavior.rb +12 -12
- data/spec/platform_detection_spec.rb +86 -86
- data/spec/spec_helper.rb +270 -261
- data/spec/unix_spec.rb +57 -57
- data/spec/windows_spec.rb +23 -23
- metadata +18 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 02b58bb5f5d2ed76658b0d6c8f5d8e8fe88cfcfbfaf725c71192505186a61981
|
4
|
+
data.tar.gz: 5ba37a1132b070d75002f48aeb8f140f7244011219079a50de455fb4c538a00b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- 2.
|
10
|
-
- 2.
|
11
|
-
- 2.
|
12
|
-
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
- "
|
22
|
-
- gem
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
- rvm:
|
36
|
-
-
|
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.
|
2
|
-
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in child_process.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
gem '
|
9
|
-
gem '
|
10
|
-
|
11
|
-
|
12
|
-
if
|
13
|
-
|
14
|
-
|
15
|
-
|
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.
|