Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby
All Projects
Ruby
Overview
Activity
Roadmap
Issues
Repository
Like
Download (410 Bytes)
Bug #3118
ยป open4_segfault.rb
simple segfault example -
mkent (Matthew Kent)
, 04/10/2010 02:45 AM
# by masakazu tojo
# http://rubyforge.org/tracker/index.php?func=detail&aid=26889&group_id=1024&atid=4025
require
"rubygems"
require
"open4"
i
=
0
loop
{
i
+=
1
begin
pid
,
stdin
,
stdout
,
stderr
=
Open4
.
popen4
(
"cat"
)
rescue
Exception
=>
err
p
err
.
message
p
err
.
class
.
to_s
break
end
stdin
.
close
stdout
.
close
stderr
.
close
Process
.
waitpid2
(
pid
)
puts
"
#{
i
}
calls"
if
i
%
1000
==
0
}
(1-1/1)
Loading...