Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Eggdrop Tcl

49 views
Skip to first unread message

Jo Christian Buvarp

unread,
Oct 9, 2001, 9:22:06 AM10/9/01
to
I'm not sure if this is the right place to ask, but i'm giving it a try :)

i've made a script that make my eggdrop tcl script to transfer files when i
give the command !transfer in a channel, i use the code like this:

proc transfer {nick uhost hand chan args} {
exec -- /bin/mirror.pl &
return 0
}

As you se !transfer executes a perl script, the perl scripts works fine when
running standalone btw :)

The problem is the following, the above script works fine, but the eggdrop
does not kill the process when it has runned, it turns into a zombie :/
Like this : [mirror.pl <defunct>]
and the process doesn't end with kill -9 <pid> I need to kill the eggdrop to
end it..

I've tried: exec -- /bin/mirror.pl (without the &)
Then it works fine, the problem is that the eggdrop hangs since the
mirror.pl executes alot of commands.. And after a while the eggdrop ping
timeouts :( but it works again when the script is finished..

So i need to use the & or another type of command :)

Help whould be greatly appreciated :)


Jo Christian Buvarp


David Wijnants

unread,
Oct 9, 2001, 11:24:25 AM10/9/01
to
It took me ages to find this one out for myself :

Tcl 'reaps child processes' when exec is called, but if you've got a
long-running process, with a long time between execs, the zombies will hang
around for a long time. One solution is to do a pro-forma exec every couple of
seconds.

proc grimreaper {} {
catch { exec "" }
after 3000 grimreaper
}

Just call this procedure once during initialisation, and it'll do the job every
three seconds. The effect on CPU seems to be non-existent.


Dave.

Jo Christian Buvarp

unread,
Oct 9, 2001, 12:35:11 PM10/9/01
to
Yeah :)

That works :):)
Tnx for the help...

Jo Christian Buvarp

"David Wijnants" <dwij...@askalix.com> wrote in message
news:3bc317ae$0$35755$8e9e...@news.atx.net...

0 new messages