Defunct processes are getting generated

Dear Sir / Madam,

We have two socket programs which are running in background. These two socket programs are creating defunct processes in HP-UX which were not happening in Compaq True64 UNIX. What is the root cause of these defunct processes and how can we correct it?

Your suggestion will be highly appreciated. Thanks...

Defunct or Zombie is an undead process,
It's a child process, Once the parent process finished it's job,then it reads it's child's exit status by sends the wait system call. in that way zombie status is removed and it's process ID will be removed from the process table. (then another process may use this PID)
If parent process failed to call wait or parent killed, then these processes will remains in the process table.

Not need to worry about the presence of few zombies but it may grow to a serious problem under heavy load of these zombies.

You can kill these processes once identified.

Thanks Laxmikant. Earlier the same program was running in Compaq True64 UNIX without any problem. After migrating to HP-UX, these defunct processes are getting generated. Please suggest how can I solve this problem. With regards and thanks.

To get rid of these processes,
1.You need to check with vendor of that program and they need to fix it in their code.
2.Other way you can try is probably apply latest patch if it is not.
3.Kill parent process for these zombies, but be carefull !!
4.You reboot the system.

hope this helps.