Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rvm:
- 2.3
- 2.4
- 2.5
- 2.6
- ruby-head

sudo: false
Expand Down
6 changes: 6 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ environment:
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 25-x64
- CHILDPROCESS_POSIX_SPAWN: true
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 26-x64
- CHILDPROCESS_POSIX_SPAWN: false
CHILDPROCESS_UNSET: should-be-unset
RUBY_VERSION: 26-x64

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
Expand Down
12 changes: 10 additions & 2 deletions lib/childprocess/unix/fork_exec_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ def launch_process
exec_r.close
set_env

STDOUT.reopen(stdout || "/dev/null")
STDERR.reopen(stderr || "/dev/null")
if stdout
STDOUT.reopen(stdout)
else
STDOUT.reopen("/dev/null", "a+")
end
if stderr
STDERR.reopen(stderr)
else
STDERR.reopen("/dev/null", "a+")
end

if duplex?
STDIN.reopen(reader)
Expand Down