First of all, thanks for the quick response.
In my case, the process dies and no zombie appears (at least when I use pidin command). I am not runing it through the debugger either.
I use the name_attach to avoid multiple occurrences of one process.
So, for my processes, the souorce code follows these steps:
1.- Use name_attach to create a new entry in the namespace. If name_attach returns NULL that means the process is already running and the execution of the new occurence is stopped.
2.- When the process dies name_detach is called to remove the name from the namespace.
I have realise that the name_detach function is not secure within signal handlers functions. What does this thing really mean?
On the other hand, I have coded other processes by registering to the namespace with name_attach, and without calling name_detach, the OS has removed their names when they die.
Could it be possible that the process name remains registered although the process is dead?
What I would really like to know is how to remove these “ghost” names once the process is killed.
Is there any situation where the process dies and its name remains in the namespace?
Thanks in advance.