Eggdrop Tcl

Skip to first unread message

Jo Christian Buvarp

Oct 9, 2001, 9:22:06 AM10/9/01
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/ &
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 : [ <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/ (without the &)
Then it works fine, the problem is that the eggdrop hangs since the 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

Oct 9, 2001, 11:24:25 AM10/9/01
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

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.


Jo Christian Buvarp

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

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

Jo Christian Buvarp

"David Wijnants" <> wrote in message

Reply all
Reply to author
0 new messages