⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (292 Bytes)
Bug #4579
» test_fork_random.rb
normalperson (Eric Wong)
, 04/15/2011 11:46 AM
require
"openssl"
require
"securerandom"
SecureRandom
.
random_bytes
(
4
)
pid
=
fork
do
p
[
$$
,
SecureRandom
.
random_bytes
(
4
)
]
end
Process
.
waitpid2
(
pid
)
loop
do
xpid
=
fork
do
p
[
$$
,
SecureRandom
.
random_bytes
(
4
)
]
if
$$
==
pid
end
Process
.
waitpid2
(
xpid
)
break
if
xpid
==
pid
end
« Previous
1
2
3
…
6
Next »
(1-1/6)
Loading...