This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Too many open files.

Old posts that have not been replied to for several years.
Locked
g
genius3k

Too many open files.

Post by genius3k »

I run a botnet of 3 eggdrops, and on one of them (only noticed this on one so far). I get errors like:
[07:00] ERROR writing user file.
[07:04] Tcl error [onjoin_out]: couldn't open "Balthamos.#chat-world": too many open files
(4 minute difference there).
Not sure about it being a tcl error considering the user file error. If it starts getting these errors, it wont accept dcc or telnet connections either for the same reason (too many open files).

Anyone know what is wrong?
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

you have forgotten to close the file at the end of the proc

search the file where "proc onjoin_out" is in and add a close for the file thats opened
g
genius3k

Well, there is a close...

Post by genius3k »

proc onjoin_out {nick addr hand chan} {
global botnick
set onmsg [open $botnick.$chan a+]
seek $onmsg 0 start

while {![eof $onmsg]} {
gets $onmsg msg1
set tempmsg [split $msg1 " " ]
if { [lindex $tempmsg 0] == "1" } {
set msg [string trimleft $msg1 "1"]
} elseif { [lindex $tempmsg 0] == "2" } {
set msg [string trimleft $msg1 "2"]
} elseif { [lindex $tempmsg 0] == "3" } {
set msg [string trimleft $msg1 "3"]
} elseif { [lindex $tempmsg 0] == "4" } {
set msg [string trimleft $msg1 "4"]
} elseif { [lindex $tempmsg 0] == "5" } {
set msg [string trimleft $msg1 "5"]
} elseif {[lindex $tempmsg 0] == ""} {
return 1
}
puthelp "NOTICE $nick :$msg "
}
close $onmsg
}

That should close it correctly, shouldnt it? btw, this isn't my code.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: Well, there is a close...

Post by strikelight »

genius3k wrote: } elseif {[lindex $tempmsg 0] == ""} {
return 1
}
It is returning without closing the file first... as such you should
add in a "close $onmsg" before the return statement.

You should contact the author of the script, and if the script is a file in the egghelp.org database, you may want to consider contacting slennox as well.
T
TsT
Voice
Posts: 16
Joined: Tue Mar 04, 2003 11:03 am
Location: Strasbourg, France
Contact:

Re: Well, there is a close...

Post by TsT »

Code: Select all

[...]
  while {![eof $onmsg]} {
    gets $onmsg msg1
    set tempmsg [split $msg1 " " ]
    set tempmsg0 [lindex $tempmsg 0]
    switch -- $tempmsg0 {
      1 - 2 - 3 - 4 - 5 {
         set msg [string trimleft $msg1 $tempmsg0]
      }
      "" {close $onmsg ; return 1}
    }
    puthelp "NOTICE $nick :$msg "
  }
  close $onmsg
[...]
This is a example to use switch...
Locked