how do I remove the defunct processes when login or chat
Will Thompson
resiak at soc.pidgin.im
Tue Aug 28 06:52:30 EDT 2007
On Tue, Aug 28, 2007 at 06:09:41PM +0800, pencil 磊 wrote:
> I execute lt-nullclient program of pidgin, When I login, there will be a
> lot of defunct processes will be created, and destroyed only lt-nullclient
> return.
In telepathy-haze, I cured this by ignoring SIGCHLD:
#include <signal.h>
/* meanwhile, somewhere in a block of initialization code */
signal (SIGCHLD, SIG_IGN);
Alternatively, you could attach a signal handler which uses waitpid to
reap your zombie children. (I strongly suspect that this is more
correct than ignoring the signal, but I got into infinitely recursive
signal handle loops when I made a stab at it.) Take a look at `man 3
signal`, `man 3 waitpid` and `man 7 signal.h`.
It's a bit of a shame that dnsquery.c doesn't do this itself, but I
guess that if the UI wanted to fork processes and listen for SIGCHLD it
would be harmful to have the DNS code catching the signal. People with
strong Unix signal-fu: is there any way that
purple_dnsquery_{resolved,failed} could reliably reap the child without
having to block?
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20070828/ab96e02d/attachment.sig>
More information about the Devel
mailing list