model/persistence.js
function(callback) {
        if (this._isShuttingDown || this._isStartingUp) {
            return;
        }

        this._isShuttingDown = true;

        // See if the app is running.
        if (!this.processId() && !this.sideProcessId()) {
            this._isShuttingDown = false;
            // Nope, not running.
            if (callback) {
                callback();
            }

            return;
        }

        // Kill the app.
        clearTimeout(this._restartTimeout);
        this._appProcess.kill();
        if (this._sideProcess) {
            this._sideProcess.kill();
        }

        // Check on an interval to see if it's dead.
        var check = setInterval(_.bind(function() {
            if (this.processId() || this.sideProcessId()) {
                return;
            }

            clearInterval(check);
            logger.info('App shut down by force.');
            this._isShuttingDown = false;
            if (callback) {
                callback();
            }
        }, this), 250);
    }
function(callback) {
        if (this._isShuttingDown || this._isStartingUp) {
            return;
        }

        this._isShuttingDown = true;

        // See if the app is running.
        if (!this.processId() && !this.sideProcessId()) {
            this._isShuttingDown = false;
            // Nope, not running.
            if (callback) {
                callback();
            }

            return;
        }

        // Kill the app.
        clearTimeout(this._restartTimeout);
        this._appProcess.kill();
        if (this._sideProcess) {
            this._sideProcess.kill();
        }

        // Check on an interval to see if it's dead.
        var check = setInterval(_.bind(function() {
            if (this.processId() || this.sideProcessId()) {
                return;
            }

            clearInterval(check);
            logger.info('App shut down by force.');
            this._isShuttingDown = false;
            if (callback) {
                callback();
            }
        }, this), 250);
    }
function ( callback ) { if ( this . _isShuttingDown || this . _isStartingUp ) { return ; } this . _isShuttingDown = true ; // See if the app is running. if ( ! this . processId ( ) && ! this . sideProcessId ( ) ) { this . _isShuttingDown = false ; // Nope, not running. if ( callback ) { callback ( ) ; } return ; } // Kill the app. clearTimeout ( this . _restartTimeout ) ; this . _appProcess . kill ( ) ; if ( this . _sideProcess ) { this . _sideProcess . kill ( ) ; } // Check on an interval to see if it's dead. var check = setInterval ( _ . bind ( function ( ) { if ( this . processId ( ) || this . sideProcessId ( ) ) { return ; } clearInterval ( check ) ; logger . info ( 'App shut down by force.' ) ; this . _isShuttingDown = false ; if ( callback ) { callback ( ) ; } } , this ) , 250 ) ; }
Kill the app process.
Kill the app process .