This module contains functions for sending system messages used by programs, and messages used for debugging purposes.
Functions used for implementation of processes are also expected to
understand system messages, such as debug messages and code change. These
functions must be used to implement the use of system messages for a
process; either directly, or through standard behaviors, such as
The default time-out is 5000 ms, unless otherwise specified.
The functions make references to a debug structure.
The debug structure is a list of
Processes that are not implemented as one of the standard behaviors must still understand system messages. The following three messages must be understood:
Plain system messages. These are received as
Shutdown messages. If the process traps exits, it must
be able to handle a shutdown request from its parent, the
supervisor. The message
If the modules used to implement the process change dynamically
during runtime, the process must understand one more message. An
example is the
This message is used by the release handler to find which processes that execute a certain module. The process can later be suspended and ordered to perform a code change for one of its modules.
When debugging a process with the functions of this
module, the process generates system_events, which are
then treated in the debug function. For example,
Three predefined system events are used when a process receives or sends a message. The process can also define its own system events. It is always up to the process itself to format these events.
See the introduction of this manual page.
Tells the process to change code. The process must be
suspended to handle this message. Argument
Gets the state of the process.
These functions are intended only to help with debugging. They are
provided for convenience, allowing developers to avoid having to
create their own state extraction functions and also avoid having
to interactively extract the state from the return values of
The value of
For a
For a
For a
For a
The module name of the event handler.
The ID of the handler (which is
The state of the handler.
If the callback module exports a function
If the callback module does not export a
If the callback module's
Function
For more information about a process, including its state, see
Gets the status of the process.
The value of
A
A
A
A
Callback modules for
Enables installation of alternative debug functions. An example of such a function is a trigger, a function that waits for some special event and performs some action when the event is generated. For example, turning on low-level tracing.
Turns the logging of system events on or off. If on, a
maximum of
If
If
The events are formatted with a function that is defined by the
process that generated the event (with a call to
Enables or disables the logging of all system events in text
format to the file. The events are formatted with a function that is
defined by the process that generated the event (with a call to
Turns off all debugging for the process. This includes
functions that are installed explicitly with function
Removes an installed debug function from the
process.
Replaces the state of the process, and returns the new state.
These functions are intended only to help with debugging, and are not to be called from normal code. They are provided for convenience, allowing developers to avoid having to create their own custom state replacement functions.
Function
For a
For a
For a
For a
The module name of the event handler.
The ID of the handler (which is
The state of the handler.
If a
If a
If the callback module exports a
If the callback module does not export a
If the callback module's function
Function
Resumes a suspended process.
Enables or disables the collection of statistics. If
Suspends the process. When the process is suspended, it only responds to other system messages, but not other messages.
Orders the process to terminate with the
specified
Prints all system events on
The following functions are used when implementing a special process. This is an ordinary process, which does not use a standard behavior, but a process that understands the standard system messages.
Can be used by a process that initiates a debug
structure from a list of options. The values of argument
Gets the data associated with a debug option.
This function is called by a process when it generates a
system event.
This function is used by a process module to take care of system
messages. The process receives a
This function never returns. It calls either of the following functions:
Argument
Prints the logged system events in the debug structure,
using
Called from
Called from
Called from
Called from
Called from