Previous: , Up: Environment Variables   [Contents][Index]

2.5.3 Other Environment Variables

A number of other environment variables affect gawk’s behavior, but they are more specialized. Those in the following list are meant to be used by regular users:


Specifies the interval between connection retries, in milliseconds. On systems that do not support the usleep() system call, the value is rounded up to an integral number of seconds.


Specifies the time, in milliseconds, for gawk to wait for input before returning with an error. See section Reading Input with a Timeout.


Controls the number of times gawk attempts to retry a two-way TCP/IP (socket) connection before giving up. See section Using gawk for Network Programming. Note that when nonfatal I/O is enabled (see section Enabling Nonfatal Output), gawk only tries to open a TCP/IP socket once.


Causes gawk to switch to POSIX-compatibility mode, disabling all traditional and GNU extensions. See section Command-Line Options.

The environment variables in the following list are meant for use by the gawk developers for testing and tuning. They are subject to change. The variables are:


This variable only affects gawk on POSIX-compliant systems. With a value of ‘exact’, gawk uses the size of each input file as the size of the memory buffer to allocate for I/O. Otherwise, the value should be a number, and gawk uses that number as the size of the buffer to allocate. (When this variable is not set, gawk uses the smaller of the file’s size and the “default” blocksize, which is usually the filesystem’s I/O blocksize.)


If this variable exists with a value of ‘gst’, gawk switches to using the hash function from GNU Smalltalk for managing arrays. This function may be marginally faster than the standard function.


If this variable exists, gawk switches to reading source files one line at a time, instead of reading in blocks. This exists for debugging problems on filesystems on non-POSIX operating systems where I/O is performed in records, not in blocks.


If this variable exists, gawk includes the file name and line number within the gawk source code from which warning and/or fatal messages are generated. Its purpose is to help isolate the source of a message, as there are multiple places that produce the same warning or error message.


Specifies the location of compiled message object files for gawk itself. This is passed to the bindtextdomain() function when gawk starts up.


If this variable exists, gawk does not use the DFA regexp matcher for “does it match” kinds of tests. This can cause gawk to be slower. Its purpose is to help isolate differences between the two regexp matchers that gawk uses internally. (There aren’t supposed to be differences, but occasionally theory and practice don’t coordinate with each other.)


This specifies the amount by which gawk should grow its internal evaluation stack, when needed.


This specifies intended maximum number of items gawk will maintain on a hash chain for managing arrays indexed by integers.


This specifies intended maximum number of items gawk will maintain on a hash chain for managing arrays indexed by strings.


If this variable exists, gawk uses the mtrace() library calls from the GNU C library to help track down possible memory leaks.

Previous: , Up: Environment Variables   [Contents][Index]