--- Jason Gauthier <[EMAIL PROTECTED]> wrote: > This has come up several times in the past. Basically, when merc/diku were > developed computers didn't have quite the... "strength" they have now. > What this does is opens a file. > It keeps the file open throughout the course of the mud running. Whenever a > new file is opened this is closed, and then when the new file is closed the > NULL_FILE is opened again. > > The reason is because each process has a limit of open file descriptors. > (Connected sockets are open file descriptors). If you run out, as it was > more possible in the past, then opening a new file would fail, the mud would > not function as expected or crash. Leaving a file open guarantees you've > always got ONE free file descriptor. > > However, and here's where the religious war starts.... It's not much > needed today. open file descriptors are configurable on almost EVERY unix > like OS, so if you really need then, you can increase the OS's variable. > Linux by default, allocated 1024 file descriptors per process. Unless you > have alot of players, and alot of open files, you don't exceed this too > quickly. > > There are other things to do... and other's will give their suggestions.. > but I removed mine.
Cool, what's your mud's addie?? I'll start cloning equipment right away. =) (j/k) Seriously though. It really isn't all that hard for a would be cheater to log in a character with the Almighty Sword of Slayage give the sword to some other character, then run a program which would exhaust all your file descriptors so when they quit, it wouldn't save their pfile. Then they stop the program again, log back in, and voom. Instantly they have 2 Almighty Swords of Slayage. Unless you prevent this sort of thing with a relational database, in which case they can simply use their program to keep people from logging into your game.. All kinds of DOS things can happen here if you aren't careful. ~Kender ===== -----BEGIN GEEK CODE BLOCK----- Version 3.1 GCS/L/C/O d-(+) s++:+ a-- C+++$>++++ UBLS++++$ P+++(--)$ L++>+++ E--- W+>++$ N !o K? w(--) !O M- !V PS+ PE(++) Y+ PGP->+ t- 5 X+() R(+) tv+@ b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++ ------END GEEK CODE BLOCK------ __________________________________________________ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/

