Right, but on a side note, if you were wondering Alexander, /dev/null is a "ghost" file. It only exists for this purpose and it isn't necessarily a real file.
Raja, the born again Eru (In other words too many people had the name Eru so I completely changed my on-line name). On Mon, 25 Mar 2002 08:34:58 -0500 Jason Gauthier <[EMAIL PROTECTED]> writes: > 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. > > Jason > > > -----Original Message----- > > From: Alexander Speransky [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 25, 2002 4:44 AM > > To: [email protected] > > Subject: NULL_FILE > > > > > > Hello! > > > > > > * The NULL_FILE is held open so that we have a stream handle > > in reserve, > > * so players can go ahead and telnet to all the other > descriptors. > > * Then we close it whenever we need to open a file (e.g. a > > save file). > > #define PLAYER_DIR "../player/" /* Player files > */ > > #define GOD_DIR "../gods/" /* list of gods > */ > > #define TEMP_FILE "../player/romtmp" > > >#define NULL_FILE "/dev/null" /* To > > reserve one stream */ > > > > > > Can anyone tell me for what this file used ? I cannot > understand.. > > Why I need it? > > > > PS I read comments, but cannot find an answer. > > > > > > -- > > Best regards, > > Alexander mailto:[EMAIL PROTECTED] > > > > > > -- > > ROM mailing list > > [email protected] > > http://www.rom.org/cgi-bin/mailman/listinfo/rom > > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom >

