Eggdev: threaded tcl
Fabian Knittel
fknittel at gmx.de
Tue Oct 17 11:02:32 CST 2000
On Tue, Oct 17, 2000 at 10:03:09AM -0500, Tothwolf wrote:
> On Mon, 16 Oct 2000, Fabian Knittel wrote:
> > On Sun, Oct 15, 2000 at 10:43:54PM -0500, Tothwolf wrote:
> > >
> > > Could part of the problem be due to the fact that eggdrop ignores
> > > SIGCHLD?
> >
> > Why would that be important when we kill the parent?
>
> Seemed like I remembered reading that threaded processes used sigchld,
> usr1 and usr2 for different things...I know for a fact usr1 and usr2 are
> used, as I had to remove eggdrop's handler code for those back around
> 1.3.25 to make eggdrop work with threaded tcl at all. sigchld may not be,
> but I can't remember where I read about it right now.
SIGCHLD is normally sent if one of your childs exited. I don't
know whether it's used by pthread, but that's not really
important, as we have the following calling tree:
< eggdrop > parent, "main thread"
\_ < pthread > child, "pthread master"
\_ < tcl > child, "tcl notifier thread"
The parent thread is stored in `pid.botname' and displayed on
startup. If people kill the parent (as they should), the childs
will be killed as well, as the pthread master thread notices
when the parent dies (it periodically checks whether its parent
is init) and kills all known threads.
I'm still waiting for Ian to either provide some more information
or confirm that the problem has been resolved / has magically
disappeared.
--
Fabian Knittel <fknittel at gmx.de> -- http://www.esc-web.de/fabian/
Signed or encrypted mail preferred. PGP DSA key ID: 0x838B4D20
More information about the Eggdev
mailing list