Exit the whole Pike program with the given
exit() with any other value than
0 (zero) indicates
that something went wrong during execution. See your system manuals
for more information about return codes.
The arguments after the
returncode will be used for a call to
werror to output a message on stderr.
This function does the same as
exit, but doesn't bother to clean
up the Pike interpreter before exiting. This means that no destructors
will be called, caches will not be flushed, file locks might not be
released, and databases might not be closed properly.
Use with extreme caution.
This function puts the
callback in a queue of callbacks to
call when pike exits. The call order is reversed, i.e. callbacks
that have been added earlier are called after
Please note that
atexit callbacks are not called if Pike
This function changes the trace level for the subsystem identified
facility is zero or left out, it
changes the global trace level which affects all subsystems.
Enabling tracing causes messages to be printed to stderr. A higher trace level includes the output from all lower levels. The lowest level is zero which disables all trace messages.
See the -t command-line option for more information.
facility is specified then there is typically only one
trace level for it, i.e. it's an on-or-off toggle. The global
trace levels, when
facility isn't specified, are:
Trace calls to Pike functions and garbage collector runs.
Trace calls to builtin functions.
Trace every interpreted opcode.
Also trace the opcode arguments.
Valid facilities are:
Trace the doings of the garbage collector. The setting is
never thread local.
Trace levels are normally thread local, so changes affect only the current thread. To change the level in all threads, pass a nonzero value in this argument.
The old trace level in the current thread is returned.
Get a description of the current call stack.
A bit mask of flags affecting generation of the backtrace.
Currently a single flag is defined:
Note that since these values are "live", they may change or dissapear at any time unless the corresponding thread has been halted or similar.
The description is returned as an array with one entry for each call frame on the stack.
The entries are represented by
The current call frame will be last in the array.
Please note that the frame order may be reversed in a later version of Pike to accommodate for deferred backtraces.
Note that the arguments reported in the backtrace are the current values of the variables, and not the ones that were at call-time. This can be used to hide sensitive information from backtraces (eg passwords).
In old versions of Pike the entries used to be represented by arrays of the following format:
A string with the filename if known, else zero.
An integer containing the linenumber if known, else zero.
The function that was called at this level.
The arguments that the function was called with.
The above format is still supported by eg
Force garbage collection.
Perform a quick garbage collection on just this value,
which must have been made weak by
All values that only have a single reference from
quick will then be freed.
quick hasn't been specified or is
this function checks all the memory for cyclic structures such
as arrays containing themselves and frees them if appropriate.
It also frees up destructed objects and things with only weak
Normally there is no need to call this function since Pike will call it by itself every now and then. (Pike will try to predict when 20% of all arrays/object/programs in memory is 'garbage' and call this routine then.)
The amount of garbage is returned. This is the number of arrays, mappings, multisets, objects and programs that had no nonweak external references during the garbage collection. It's normally the same as the number of freed things, but there might be some difference since _destruct() functions are called during freeing, which can cause more things to be freed or allocated.
Returns the number of arguments given when the previous function was called.
This is useful for functions that take a variable number of arguments.
Report the version of Pike. Does the same as
sprintf("Pike v%d.%d release %d", __REAL_VERSION__, __REAL_MINOR__, __REAL_BUILD__);