.. topic:: Starting LDMud :name: invocation .. program:: ldmud This document explores the process, options and arguments used to invoke the LDMud driver from the command line. This document describes the commandline version of the driver only; non-commandline versions are platform specific and described in the related documentation. .. todo:: needs much general/clarity work .. todo:: in this document, any references to _compile_ options need to be properly linked/refd; this involves using the option role for something like `configure --enable-yydebug`. Two tricks: create a doc that documents them in the first place, and convert the syntax used here to the actual configure syntax. search for a few keywords like compile to hunt down documentation that refers to configure/build/compile-time options for the driver The driver is invoked from the commandline as other normal programs. Neither the current directory nor the directory the executable is in need to be in any special relation the directory of the mudlib. Once the driver is running, it emits two streams of outputs: - driver-related messages on stderr; this unfortunately includes LPC compiler diagnostics - LPC runtime-related messages in the logfile /.parse.log (the name can be changed). It is possible to start the driver without any commandline arguments as suitable defaults are specified at compile time. The invocation syntax is:: driver [options] []... the number of the port the driver shall use to accept connections. The maximum number of ports is determined by MAXNUMPORTS in the source file config.h. The options modify the behaviour of the gamedriver. Some of them are only available if a certain compile-time option was enabled (typically in the source file config.h). The following options are recognized: .. option:: -P, --inherit Inherit filedescriptor from the parent process as socket to listen for connections. Only available if compiled with MAXNUMPORTS. .. option:: -u, --udp Specify the for the UDP port, overriding the compiled-in default. Only available if compiled with CATCH_UDP_PORT. .. option:: -D, --define [=] Add (optionally to be expanded to ) to the list of predefined macros known by the LPC compiler. .. option:: -E, --eval-cost Set the number of available for one evaluation thread. If 0, execution is unlimited. .. option:: -M, --master Use for the master object. .. option:: -m, --mudlib Use as the top directory of the mudlib. .. option:: --debug-file Log all debug output in instead of /.debug.log . .. option:: --hostname Use as hostname instead of what the system says. .. option:: --hostaddr Use as address of this machine, instead of what the system says. In particular this address will be used to open the driver ports. .. option:: --no-compat .. option:: --compat Select the mode (plain or compat) of the driver. This choice does not affect the default name of the master object. .. option:: -d, --debug Generate debug output; repeat the argument for even more output: * ``>= 1``: log resets, clean ups, swaps, reception of urgend data, telnet negotiation states. check_a_lot_of_refcounts() on startup when swapping of variables is disabled. * ``>= 2``: log all add_message()s, name lookup failures, new players. * ``>= 3``: progress of garbage collection * ``>= 4``: even more junk from garbage collection .. option:: -c, --list-compiles List the name of every compiled file on stderr. .. option:: -e, --no-preload Pass a non-zero argument (the number of occurences of this option) to :master:`preload`, which usually inhibits all preloads of castles and other objects. .. option:: --erq , --erq " " Use instead of 'erq' as the basename of the ERQ executable. If the name starts with a '/', it is take to be an absolute pathname, otherwise it is interpreted relative to . If not specified, 'erq' is used as the executable name. By enclosing the argument value in quotes, it is possible to pass arguments (e.g. --execdir) to the erq. These arguments however must not contain embedded spaces. .. option:: -N, --no-erq Don't start the erq demon (if it would be started at all). .. option:: --alarm-time Set the granularity of call_out() and heartbeat timing. Minimum value is 1. .. option:: --heart-interval Set the interval between two heartbeats. Minimum value is 1. .. option:: --sync-heart All heartbeats occur at the same time (modulo granularity). .. option:: --async-heart Heartbeats occur when they are due (modulo granularity). .. option:: -t, --no-heart Disable heartbeats and call_outs. .. option:: -f, --funcall The lfun master->flag() is called with as argument before the gamedriver accepts netword connections. .. option:: --regexp pcre | traditional Select the default regexp package. .. option:: --max-array The maximum number of elements an array can hold. Set to 0, arrays of any size are allowed. .. option:: --max-mapping The maximum number of elements a mapping can hold. Set to 0, mappings of any size are allowed. .. option:: --max-mapping-keys The maximum number of entries a mapping can hold. Set to 0, mappings of any size are allowed. .. option:: --max-callouts The maximum number of callouts at one time. Set to 0, any number is allowed. .. option:: --max-bytes The maximum number of bytes one read_bytes()/write_bytes() call can handle. Set to 0, reads and writes of any size are allowed. .. option:: --max-file The maximum number of bytes one read_file()/write_file() call can handle. Set to 0, reads and writes of any size are allowed. .. option:: --max-thread-pending The maximum number of bytes to be kept pending by the socket write thread. Set to 0, an unlimited amount of data can be kept pending. This option is ignored if pthreads are not used. .. option:: --cleanup-time