core/cleanup

Script Cleanup Function Support

Script Overview

The core/cleanup library provides a mechanism for other libraries to register functions that get called when the script exits.

Some libraries need to perform cleanup before exiting. This can include releasing system resources (deleting files, closing sockets, etc.) or reversing temporary side-effects. The cleanup_add() function provided by this library allows registering functions to accomplish that task.

Dependency Graph

core/cleanup: Library Dependencies

View color source code (raw) for this file

View reStructuredText (rst) source code for this page

Library Settings

$cleanup_funcs[]

Lists functions to be called upon application exit.

Public Interface

cleanup_init()

Initializes the core/cleanup library.

This function registers an internal function, cleanup_exec(), that will called when the process receives the EXIT signal.

cleanup_add()

Registers a function ($1) that will be called when the application exits.

Internal Functions

cleanup_exec()

Called when the process receives the EXIT signal at application exit(). Calls all cleanup functions that were registered with cleanup_add().


View the Developer Guide Index

View the Reference Manual Index


Generated on Tue Jul 4 17:01:47 PDT 2017 by mcsh d14 v0.21.0.