Kill a process!!!!!

How do i kill kill process whose status is <defunct> under SINIX.
I tried the kill command and i get the messages which says
"no such process". I used the process ID  with the kill command.I have
the root access and even as the "super user" i can't get rid of those
processes.This processes (<defunct>) eventuallly lead to a case where i
get the message ".profile can't fork...too many processes started" when
i try to start an xterm session.Even rlogin fails---> gives the same message
as stated above.


Thank you in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

It has been my experience on HP Unix and SCO Unix that the kill command must be associated with a -9 then the PID.  You might want to check the man page on kill for your flavor of unix and see what it has for a unconditional kill of a PID #.  Also, I might suggest that you peform a "ps -ef | more" a trace the PID that you are trying to kill and see what user or daemon started that original process.

I wish I had more advise for you.  But I had the same problem on HP9000 and found that the -9 options "kill -9 23434" was the only way.

I do not think that you can kill defunct/zombie processes. They usually stick around becaise a child has been spawned by a parent but not cleaned up properly. This typically happens when the forked child has exited but the parent has not properly cleaned them up. Although there is no one answer on killing these for a given *NIX system, you can frequently get rid of these by killing the _parent_ process, rather than the child. Better yet, you might want to figure out why the parent process is not cleaning things up properly and rectify your situation properly.

This is much better described in the unix programming FAQ: (question 1.6) (question 3.13)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
onalennaAuthor Commented:
This is happening on a 'live' system where everything has to be up and running all the time.So killing the parent will probably stop the system and that is not allowed.Kill -9 PID does'nt work.
You should be able to check the parent process associated with those zombies using 'ps'. Have you done this?


p.s. No need to rush to accept an answer if you're not happy with it. I'd rather spend a few extra steps and help you through your problem than get a 'D' :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.