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
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.
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...