diff -Nru ruby-childprocess-3.0.0/appveyor.yml ruby-childprocess-4.0.0/appveyor.yml --- ruby-childprocess-3.0.0/appveyor.yml 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/appveyor.yml 2020-06-29 13:34:40.000000000 +0000 @@ -4,12 +4,6 @@ matrix: - CHILDPROCESS_POSIX_SPAWN: true CHILDPROCESS_UNSET: should-be-unset - RUBY_VERSION: 23-x64 - - CHILDPROCESS_POSIX_SPAWN: false - CHILDPROCESS_UNSET: should-be-unset - RUBY_VERSION: 23-x64 - - CHILDPROCESS_POSIX_SPAWN: true - CHILDPROCESS_UNSET: should-be-unset RUBY_VERSION: 24-x64 - CHILDPROCESS_POSIX_SPAWN: false CHILDPROCESS_UNSET: should-be-unset diff -Nru ruby-childprocess-3.0.0/CHANGELOG.md ruby-childprocess-4.0.0/CHANGELOG.md --- ruby-childprocess-3.0.0/CHANGELOG.md 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/CHANGELOG.md 2020-06-29 13:34:40.000000000 +0000 @@ -1,6 +1,10 @@ +### Version 4.0.0 / 2020-06-18 + +* [#167](https://github.com/enkessler/childprocess/pull/167): Fix detach behavior on Windows + ### Version 3.0.0 / 2019-09-20 -* [#156](https://github.com/enkessler/childprocess/pull/156)Remove unused `rubyforge_project` from gemspec +* [#156](https://github.com/enkessler/childprocess/pull/156): Remove unused `rubyforge_project` from gemspec * [#160](https://github.com/enkessler/childprocess/pull/160): Remove extension to conditionally install `ffi` gem on Windows platforms * [#160](https://github.com/enkessler/childprocess/pull/160): Remove runtime dependency on `rake` gem diff -Nru ruby-childprocess-3.0.0/childprocess.gemspec ruby-childprocess-4.0.0/childprocess.gemspec --- ruby-childprocess-3.0.0/childprocess.gemspec 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/childprocess.gemspec 2020-06-29 13:34:40.000000000 +0000 @@ -18,7 +18,7 @@ s.test_files = `git ls-files -- spec/*`.split("\n") s.require_paths = ["lib"] - s.required_ruby_version = '>= 2.3.0' + s.required_ruby_version = '>= 2.4.0' s.add_development_dependency "rspec", "~> 3.0" s.add_development_dependency "yard", "~> 0.0" diff -Nru ruby-childprocess-3.0.0/debian/changelog ruby-childprocess-4.0.0/debian/changelog --- ruby-childprocess-3.0.0/debian/changelog 2019-09-24 09:32:25.000000000 +0000 +++ ruby-childprocess-4.0.0/debian/changelog 2020-06-29 14:00:06.000000000 +0000 @@ -1,6 +1,21 @@ +ruby-childprocess (4.0.0-1) unstable; urgency=medium + + * Team upload + + * New upstream version 4.0.0 + * debian/control + - Set Standards-Version: 4.5.0 + + * Use secure copyright file specification URI. + * Use secure URI in Homepage field. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + + -- Hideki Yamane Mon, 29 Jun 2020 23:00:06 +0900 + ruby-childprocess (3.0.0-1) unstable; urgency=medium - * Team upload + * Team upload * New upstream version 3.0.0 * debian/control - adjust Build-Dependencies, drop debhelper, debhelper-compat is enough @@ -12,7 +27,7 @@ ruby-childprocess (2.0.0-1) unstable; urgency=medium - * Team upload + * Team upload [ Hideki Yamane ] * New upstream version 2.0.0 @@ -39,7 +54,7 @@ ruby-childprocess (0.9.0-1) unstable; urgency=medium - * Team upload + * Team upload * New upstream release * debian/watch @@ -130,7 +145,7 @@ ruby-childprocess (0.3.2-2) unstable; urgency=low * Bump build dependency on gem2deb to >= 0.3.0~ - * Set DM-Upload-Allowed: to yes + * Set DM-Upload-Allowed: to yes -- Cédric Boutillier Tue, 26 Jun 2012 07:55:40 +0200 diff -Nru ruby-childprocess-3.0.0/debian/control ruby-childprocess-4.0.0/debian/control --- ruby-childprocess-3.0.0/debian/control 2019-09-24 09:32:25.000000000 +0000 +++ ruby-childprocess-4.0.0/debian/control 2020-06-29 14:00:06.000000000 +0000 @@ -11,10 +11,10 @@ yard, locales-all, procps, -Standards-Version: 4.4.0 +Standards-Version: 4.5.0 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-childprocess.git Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-childprocess -Homepage: http://github.com/jarib/childprocess +Homepage: https://github.com/jarib/childprocess Testsuite: autopkgtest-pkg-ruby XS-Ruby-Versions: all Rules-Requires-Root: no diff -Nru ruby-childprocess-3.0.0/debian/copyright ruby-childprocess-4.0.0/debian/copyright --- ruby-childprocess-3.0.0/debian/copyright 2019-09-24 09:32:25.000000000 +0000 +++ ruby-childprocess-4.0.0/debian/copyright 2020-06-29 14:00:06.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: childprocess Source: http://github.com/jarib/childprocess diff -Nru ruby-childprocess-3.0.0/debian/patches/0001-do-not-use-git-in-gemspec.patch ruby-childprocess-4.0.0/debian/patches/0001-do-not-use-git-in-gemspec.patch --- ruby-childprocess-3.0.0/debian/patches/0001-do-not-use-git-in-gemspec.patch 2019-09-24 09:32:25.000000000 +0000 +++ ruby-childprocess-4.0.0/debian/patches/0001-do-not-use-git-in-gemspec.patch 2020-06-29 14:00:06.000000000 +0000 @@ -20,4 +20,4 @@ + s.test_files = Dir['spec/*'] s.require_paths = ["lib"] - s.required_ruby_version = '>= 2.3.0' + s.required_ruby_version = '>= 2.4.0' diff -Nru ruby-childprocess-3.0.0/debian/upstream/metadata ruby-childprocess-4.0.0/debian/upstream/metadata --- ruby-childprocess-3.0.0/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ ruby-childprocess-4.0.0/debian/upstream/metadata 2020-06-29 14:00:06.000000000 +0000 @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/jarib/childprocess/issues +Bug-Submit: https://github.com/jarib/childprocess/issues/new +Repository: https://github.com/jarib/childprocess.git +Repository-Browse: https://github.com/jarib/childprocess diff -Nru ruby-childprocess-3.0.0/lib/childprocess/version.rb ruby-childprocess-4.0.0/lib/childprocess/version.rb --- ruby-childprocess-3.0.0/lib/childprocess/version.rb 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/lib/childprocess/version.rb 2020-06-29 13:34:40.000000000 +0000 @@ -1,3 +1,3 @@ module ChildProcess - VERSION = '3.0.0' + VERSION = '4.0.0' end diff -Nru ruby-childprocess-3.0.0/lib/childprocess/windows/process.rb ruby-childprocess-4.0.0/lib/childprocess/windows/process.rb --- ruby-childprocess-3.0.0/lib/childprocess/windows/process.rb 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/lib/childprocess/windows/process.rb 2020-06-29 13:34:40.000000000 +0000 @@ -71,7 +71,7 @@ @handle = Handle.open @pid if leader? - @job = Job.new + @job = Job.new(detach?, true) @job << @handle end @@ -93,7 +93,7 @@ class Job - def initialize + def initialize(detach, leader) @pointer = Lib.create_job_object(nil, nil) if @pointer.nil? || @pointer.null? @@ -101,7 +101,8 @@ end basic = JobObjectBasicLimitInformation.new - basic[:LimitFlags] = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOB_OBJECT_LIMIT_BREAKAWAY_OK + basic[:LimitFlags] |= JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE if !detach + basic[:LimitFlags] |= JOB_OBJECT_LIMIT_BREAKAWAY_OK if leader extended = JobObjectExtendedLimitInformation.new extended[:BasicLimitInformation] = basic diff -Nru ruby-childprocess-3.0.0/README.md ruby-childprocess-4.0.0/README.md --- ruby-childprocess-3.0.0/README.md 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/README.md 2020-06-29 13:34:40.000000000 +0000 @@ -14,7 +14,7 @@ # Requirements -* Ruby 2.3+, JRuby 9+ +* Ruby 2.4+, JRuby 9+ Windows users **must** ensure the `ffi` gem (`>= 1.0.11`) is installed in order to use ChildProcess. @@ -69,21 +69,33 @@ ```ruby r, w = IO.pipe -proc = ChildProcess.build("echo", "foo") -proc.io.stdout = proc.io.stderr = w -proc.start - -Thread.new { - begin - loop do - print r.readpartial(8192) +begin + process = ChildProcess.build("sh" , "-c", + "for i in {1..3}; do echo $i; sleep 1; done") + process.io.stdout = w + process.start # This results in a fork, inheriting the write end of the pipe. + + # Close parent's copy of the write end of the pipe so when the (forked) child + # process closes its write end of the pipe the parent receives EOF when + # attempting to read from it. If the parent leaves its write end open, it + # will not detect EOF. + w.close + + thread = Thread.new do + begin + loop do + print r.readpartial(16384) + end + rescue EOFError + # Child has closed the write end of the pipe end - rescue EOFError end -} -proc.wait -w.close + process.wait + thread.join +ensure + r.close +end ``` Note that if you just want to get the output of a command, the backtick method on Kernel may be a better fit. diff -Nru ruby-childprocess-3.0.0/.travis.yml ruby-childprocess-4.0.0/.travis.yml --- ruby-childprocess-3.0.0/.travis.yml 2019-09-24 05:14:57.000000000 +0000 +++ ruby-childprocess-4.0.0/.travis.yml 2020-06-29 13:34:40.000000000 +0000 @@ -4,7 +4,6 @@ rvm: - rbx-3 - - 2.3 - 2.4 - 2.5 - 2.6 @@ -16,9 +15,7 @@ before_install: - "echo 'gem: --no-document' > ~/.gemrc" - # RubyGems update is supported for Ruby 2.3 and later - - ruby -e "system('gem update --system') if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.3')" - - gem install bundler --version '~> 1.17' + - gem install bundler before_script: - 'export JAVA_OPTS="${JAVA_OPTS_FOR_SPECS}"'