The quit() function stops the back end, or the Domain Manager in the case of inflow adapters. No arguments are passed to the function. When the quit() function is encountered, the ASL script immediately ceases execution.

A call to the quit() function does not return, except when you run sm_adapter with the -s option to connect the adapter to a remote Domain Manager, and then you call quit(). In this case, the remote Domain Manager initiates its shutdown procedure and the function does return. The calling script continues running while the remote Domain Manager shuts down (which may take more than a few seconds). The script may even interact with the back-end Domain Manager during the interval between calling quit() and the Domain Manager actually shutting down. And so long as the script never tries to interact with the back-end Domain Manager once it has shut down, the script can continue running indefinitely.

The syntax to stop a remote adapter is as follows:


The syntax to stop the current adapter is as follows:

If you launch sm_adapter and do not specify a back end, the adapter becomes its own back end.  In such cases, quit() does the same thing as self->quit().