Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby
All Projects
Ruby
Overview
Activity
Roadmap
Issues
Repository
Download (710 Bytes)
Bug #17304
» reproducer.rb
simplified reproducer -
thinline (THINline s.r.o.)
, 11/02/2020 12:44 PM
require
'socket'
class
SubKlass
attr_reader
:socket
private
def
initialize
(
arrayparam
=
[],
opts
=
{})
socket
,
child
=
UNIXSocket
.
pair
@pid
=
fork
do
STDIN
.
reopen
(
child
)
STDOUT
.
reopen
(
child
)
child
.
close
socket
.
close
arrayparam
.
unshift
(
'/bin/cat'
)
exec
(
*
arrayparam
,
close_others:
true
)
end
child
.
close
@socket
=
socket
end
end
class
Klass
def
method
()
# issues a write to @instance's socket
@instance
.
socket
.
write
(
'test'
)
begin
@instance
.
socket
.
read_nonblock
(
16
)
rescue
retry
end
end
def
initialize
(
arrayparam:
[])
@instance
=
SubKlass
.
new
(
arrayparam
,
otherparam: :symbol
)
end
end
params
=
[]
instance
=
Klass
.
new
(
arrayparam:
params
)
instance
.
method
« Previous
1
2
Next »
(1-1/2)
Loading...