Slave

From TinyMUX
Revision as of 17:42, 27 April 2010 by Brazil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A slave process is spawned by the game's main server process for delegating potentially time-consuming tasks. The communication between these two processes it typically some form of Unix pipe or socket.

PennMUSH and TinyMUX use the slave process to handle reverse-DNS lookups and Ident lookups for the purpose of identifying the connecting user. Depending on what information can be gleaned (and whether the MUSH server is running on Windows), this information is available to the Wizard-flagged staff on the wizard-WHO in one of several forms as follows:

Player Name        On For Idle   Room    Cmds   Host
Prism1               0:26  57s   #1269      2   127.0.0.1
Prism2               0:27  56s   #1270      3   dnsname.com
Prism3               0:28  55s   #1271      4   COMPUTERNAME
Prism4               0:29  54s   #1272      5   user@127.0.0.1
Prism5               0:30  53s   #1273      6   user@dnsname.com

It is also available to the player via the @last command, the lastsite attribute, and the lastip attribute.

Server Differences

PennMUSH calls its slave process info_slave, and uses it for both reverse-DNS lookups and Ident lookups. It limits itself to 5 simultaneous lookups. It does not provide an in-game command to restart the slave. However, if the process exits for some reason, it is detected and automatically restarted. info_slave is not supported on Windows. On that OS, lookups are done synchronously in the main process.

TinyMUX calls its slave process slave, and uses it for both reverse-DNS lookups and Ident lookups. Currently, the Unix version of TinyMUX's slave limits itself to 20 simultaneous lookups. If the slave terminates for some reason, @startslave can be used to start it again. The Win32 version of TinyMUX does not use a separate slave process. Instead, it relies on five background threads with the main game process to accomplish the same work.