childprocess 0.9.0 → 4.1.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.
- checksums.yaml +5 -5
- data/.document +6 -6
- data/.gitignore +28 -28
- data/.rspec +1 -1
- data/.travis.yml +37 -44
- data/CHANGELOG.md +83 -49
- data/Gemfile +9 -15
- data/LICENSE +20 -20
- data/README.md +230 -196
- data/Rakefile +61 -61
- data/appveyor.yml +36 -60
- data/childprocess.gemspec +26 -30
- 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/arm64-macosx.rb +11 -0
- 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 +131 -130
- data/lib/childprocess/windows/process_builder.rb +178 -175
- data/lib/childprocess/windows/structs.rb +148 -148
- data/lib/childprocess/windows.rb +38 -33
- data/lib/childprocess.rb +210 -205
- data/spec/abstract_io_spec.rb +12 -12
- data/spec/childprocess_spec.rb +447 -422
- 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 +13 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7a5e6dc8970dbfa81b42c587480b4cd7a564995c2a6a0be84f2c8192edcf6d0c
|
4
|
+
data.tar.gz: 766be22f3575a6ef9ba837a37722f0a852f509fc9efb2a77b01ca121b865a28e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e4ac84967566de68d200d983bfebca6fce9575d7e8fb0aa0324b64dc4b6e0d29d29abe173ce99a54f8b37501eb515573b457f6b612a395f3f5d2bc672da6802
|
7
|
+
data.tar.gz: 16bc7aaffd67ab47f1f8a8ded31681fb88f1767421838c3ddb1f1033fb7dc0f5c5d664b7dce3fb4107edb9818a73ce2769f23a3e1f30bf51ffc3dd088d8a7690
|
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,44 +1,37 @@
|
|
1
|
-
os:
|
2
|
-
- linux
|
3
|
-
- osx
|
4
|
-
|
5
|
-
rvm:
|
6
|
-
-
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- 2.
|
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
|
-
exclude:
|
39
|
-
# Travis does not provide 1.9.3 on OSX
|
40
|
-
- rvm: 1.9.3
|
41
|
-
os: osx
|
42
|
-
# Travis does not provide 2.0.0 on it latest version of OSX
|
43
|
-
- rvm: 2.0.0
|
44
|
-
os: osx
|
1
|
+
os:
|
2
|
+
- linux
|
3
|
+
- osx
|
4
|
+
|
5
|
+
rvm:
|
6
|
+
- rbx-3
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6
|
10
|
+
- ruby-head
|
11
|
+
|
12
|
+
sudo: false
|
13
|
+
|
14
|
+
cache: bundler
|
15
|
+
|
16
|
+
before_install:
|
17
|
+
- "echo 'gem: --no-document' > ~/.gemrc"
|
18
|
+
- gem install bundler
|
19
|
+
|
20
|
+
before_script:
|
21
|
+
- 'export JAVA_OPTS="${JAVA_OPTS_FOR_SPECS}"'
|
22
|
+
|
23
|
+
env:
|
24
|
+
global:
|
25
|
+
matrix:
|
26
|
+
- CHILDPROCESS_POSIX_SPAWN=true CHILDPROCESS_UNSET=should-be-unset
|
27
|
+
- CHILDPROCESS_POSIX_SPAWN=false CHILDPROCESS_UNSET=should-be-unset
|
28
|
+
|
29
|
+
matrix:
|
30
|
+
allow_failures:
|
31
|
+
- rvm: rbx-3
|
32
|
+
- rvm: ruby-head
|
33
|
+
- env: "CHILDPROCESS_POSIX_SPAWN=true"
|
34
|
+
include:
|
35
|
+
- rvm: jruby-9.2.5.0
|
36
|
+
jdk: openjdk11
|
37
|
+
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,49 +1,83 @@
|
|
1
|
-
### Version
|
2
|
-
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
### Version 0.
|
7
|
-
|
8
|
-
*
|
9
|
-
|
10
|
-
|
11
|
-
### Version 0.
|
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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
1
|
+
### Version 4.1.0 / 2021-06-08
|
2
|
+
|
3
|
+
* [#170](https://github.com/enkessler/childprocess/pull/170): Update gem homepage to use `https://`
|
4
|
+
* [#177](https://github.com/enkessler/childprocess/pull/177): Add ARM64-macos support
|
5
|
+
|
6
|
+
### Version 4.0.0 / 2020-06-18
|
7
|
+
|
8
|
+
* [#167](https://github.com/enkessler/childprocess/pull/167): Fix detach behavior on Windows
|
9
|
+
* [#168](https://github.com/enkessler/childprocess/pull/168): Drop support for Ruby 2.3
|
10
|
+
|
11
|
+
### Version 3.0.0 / 2019-09-20
|
12
|
+
|
13
|
+
* [#156](https://github.com/enkessler/childprocess/pull/156): Remove unused `rubyforge_project` from gemspec
|
14
|
+
* [#160](https://github.com/enkessler/childprocess/pull/160): Remove extension to conditionally install `ffi` gem on Windows platforms
|
15
|
+
* [#160](https://github.com/enkessler/childprocess/pull/160): Remove runtime dependency on `rake` gem
|
16
|
+
|
17
|
+
### Version 2.0.0 / 2019-07-11
|
18
|
+
|
19
|
+
* [#148](https://github.com/enkessler/childprocess/pull/148): Drop support for Ruby 2.0, 2.1, and 2.2
|
20
|
+
* [#149](https://github.com/enkessler/childprocess/pull/149): Fix Unix fork reopen to be compatible with Ruby 2.6
|
21
|
+
* [#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
|
22
|
+
|
23
|
+
### Version 1.0.1 / 2019-02-03
|
24
|
+
|
25
|
+
* [#143](https://github.com/enkessler/childprocess/pull/144): Fix installs by adding `rake` gem as runtime dependency
|
26
|
+
* [#147](https://github.com/enkessler/childprocess/pull/147): Relax `rake` gem constraint from `< 12` to `< 13`
|
27
|
+
|
28
|
+
### Version 1.0.0 / 2019-01-28
|
29
|
+
|
30
|
+
* [#134](https://github.com/enkessler/childprocess/pull/134): Add support for non-ASCII characters on Windows
|
31
|
+
* [#132](https://github.com/enkessler/childprocess/pull/132): Install `ffi` gem requirement on Windows only
|
32
|
+
* [#128](https://github.com/enkessler/childprocess/issues/128): Convert environment variable values to strings when `posix_spawn` enabled
|
33
|
+
* [#141](https://github.com/enkessler/childprocess/pull/141): Support JRuby on Java >= 9
|
34
|
+
|
35
|
+
### Version 0.9.0 / 2018-03-10
|
36
|
+
|
37
|
+
* Added support for DragonFly BSD.
|
38
|
+
|
39
|
+
|
40
|
+
### Version 0.8.0 / 2017-09-23
|
41
|
+
|
42
|
+
* Added a method for determining whether or not a process had been started.
|
43
|
+
|
44
|
+
|
45
|
+
### Version 0.7.1 / 2017-06-26
|
46
|
+
|
47
|
+
* Fixed a noisy uninitialized variable warning
|
48
|
+
|
49
|
+
|
50
|
+
### Version 0.7.0 / 2017-05-07
|
51
|
+
|
52
|
+
* Debugging information now uses a Logger, which can be configured.
|
53
|
+
|
54
|
+
|
55
|
+
### Version 0.6.3 / 2017-03-24
|
56
|
+
|
57
|
+
See beta release notes.
|
58
|
+
|
59
|
+
|
60
|
+
### Version 0.6.3.beta.1 / 2017-03-10
|
61
|
+
|
62
|
+
* Bug fix: Fixed child process creation problems on Windows 7 when a child was declared as a leader.
|
63
|
+
|
64
|
+
|
65
|
+
### Version 0.6.2 / 2017-02-25
|
66
|
+
|
67
|
+
* Bug fix: Fixed a potentially broken edge case that could occur on older 32-bit OSX systems.
|
68
|
+
|
69
|
+
|
70
|
+
### Version 0.6.1 / 2017-01-22
|
71
|
+
|
72
|
+
* Bug fix: Fixed a dependency that was accidentally declared as a runtime
|
73
|
+
dependency instead of a development dependency.
|
74
|
+
|
75
|
+
|
76
|
+
### Version 0.6.0 / 2017-01-22
|
77
|
+
|
78
|
+
* Support for Ruby 2.4 added
|
79
|
+
|
80
|
+
|
81
|
+
### Version 0.5.9 / 2016-01-06
|
82
|
+
|
83
|
+
* The Great Before Times...
|
data/Gemfile
CHANGED
@@ -1,15 +1,9 @@
|
|
1
|
-
source
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in child_process.gemspec
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
+
# Used for local development/testing only
|
7
|
+
gem 'rake'
|
8
|
+
|
9
|
+
gem 'ffi' if ENV['CHILDPROCESS_POSIX_SPAWN'] == 'true' || Gem.win_platform?
|
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.
|