defunct process

T

tharris tharris

Hi

I am dettaching process like below in my code however I am still getting
ruby processes showing as defunct when I do ps -aux. Why would this be
happening I thought the 'Process.detach(pid)' would take care of this or
am I mistaken?

loop do

pid = fork do
..........
..........
..........
end

Process.detach(pid)
end
 
R

Robert Klemme

I am dettaching process like below in my code however I am still getting
ruby processes showing as defunct when I do ps -aux. Why would this be
happening I thought the 'Process.detach(pid)' would take care of this or
am I mistaken?

loop do

=A0pid =3D fork do
=A0 =A0..........
=A0 =A0..........
=A0 =A0..........
=A0end

=A0Process.detach(pid)
end

I don't think there is a fixed guarantee how fast the reaping occurs.
It may be that the reaper thread(s) simply did not yet get CPU cycles
to do their job.

Cheers

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top