mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
io.c: pipe_register_fptr
* io.c (pipe_register_fptr): get rid of double registration which causes access after free and segfault. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80d74ea732
commit
1d5847d1af
2 changed files with 25 additions and 4 deletions
|
@ -1810,6 +1810,15 @@ class TestProcess < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_popen_reopen
|
||||
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
|
||||
begin;
|
||||
io = File.open(IO::NULL)
|
||||
IO.popen("echo") {|f| io.reopen(f)}
|
||||
io.reopen(io.dup)
|
||||
end;
|
||||
end
|
||||
|
||||
def test_execopts_new_pgroup
|
||||
return unless windows?
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue