core/utils/lib/proc.js
function() {
        //Default.
        var pathObj = new _( getPath('root') + '/tmp/pid/' );
        var path = pathObj.toString();

        //Create dir if needed.
        //console.debug("MKDIR  pathObj (pid:"+self.proc.pid+") - ", self.bundle);

        process.list = (process.list == undefined) ? [] : process.list;
        process.pids = (process.pids == undefined) ? {} : process.pids;

        self.register(self.bundle, self.proc.pid);

        if (usePidFile) {
            pathObj.mkdir( function(err, path){
                console.debug('path created ('+path+') now saving PID ' +  bundle);
                //logger.info('gina', 'PROC:INFO:1', 'path created ('+path+') now saving PID ' +  bundle, __stack);
                //Save file.
                if (!err) {
                    self.PID = self.proc.pid;
                    self.path = path + pathObj.sep;
                    //Add PID file.
                    setPID(self.bundle, self.PID, self.proc);
                    save(self.bundle, self.PID, self.proc)
                }
            })
        }
    }
function() {
        //Default.
        var pathObj = new _( getPath('root') + '/tmp/pid/' );
        var path = pathObj.toString();

        //Create dir if needed.
        //console.debug("MKDIR  pathObj (pid:"+self.proc.pid+") - ", self.bundle);

        process.list = (process.list == undefined) ? [] : process.list;
        process.pids = (process.pids == undefined) ? {} : process.pids;

        self.register(self.bundle, self.proc.pid);

        if (usePidFile) {
            pathObj.mkdir( function(err, path){
                console.debug('path created ('+path+') now saving PID ' +  bundle);
                //logger.info('gina', 'PROC:INFO:1', 'path created ('+path+') now saving PID ' +  bundle, __stack);
                //Save file.
                if (!err) {
                    self.PID = self.proc.pid;
                    self.path = path + pathObj.sep;
                    //Add PID file.
                    setPID(self.bundle, self.PID, self.proc);
                    save(self.bundle, self.PID, self.proc)
                }
            })
        }
    }
function ( ) { //Default. var pathObj = new _ ( getPath ( 'root' ) + '/tmp/pid/' ) ; var path = pathObj . toString ( ) ; //Create dir if needed. //console.debug("MKDIR  pathObj (pid:"+self.proc.pid+") - ", self.bundle); process . list = ( process . list == undefined ) ? [ ] : process . list ; process . pids = ( process . pids == undefined ) ? { } : process . pids ; self . register ( self . bundle , self . proc . pid ) ; if ( usePidFile ) { pathObj . mkdir ( function ( err , path ) { console . debug ( 'path created (' + path + ') now saving PID ' + bundle ) ; //logger.info('gina', 'PROC:INFO:1', 'path created ('+path+') now saving PID ' +  bundle, __stack); //Save file. if ( ! err ) { self . PID = self . proc . pid ; self . path = path + pathObj . sep ; //Add PID file. setPID ( self . bundle , self . PID , self . proc ) ; save ( self . bundle , self . PID , self . proc ) } } ) } }
Check target path
@param {string} path
@param {integer} PID Id of the PID to save
Check target path