lib/daemon/index.js
function lockAndLoad() {
	// lock command execution

	if (!setFilePid(CMD_LOCK_FILE)) {
		err(chalk.red.bold('A command is already running, aborting...'));

		process.exit(EXIT_LOCKED);

		// abort the normal code flow

		return interrupt();
	}

	process.once('exit', function () {
		// using "exit" ensures that it gets removed, even if there was an exception

		destroyFilePid(CMD_LOCK_FILE);
	});

	return loadAppStatus();
}
function lockAndLoad() {
	// lock command execution

	if (!setFilePid(CMD_LOCK_FILE)) {
		err(chalk.red.bold('A command is already running, aborting...'));

		process.exit(EXIT_LOCKED);

		// abort the normal code flow

		return interrupt();
	}

	process.once('exit', function () {
		// using "exit" ensures that it gets removed, even if there was an exception

		destroyFilePid(CMD_LOCK_FILE);
	});

	return loadAppStatus();
}
function lockAndLoad ( ) { // lock command execution if ( ! setFilePid ( CMD_LOCK_FILE ) ) { err ( chalk . red . bold ( 'A command is already running, aborting...' ) ) ; process . exit ( EXIT_LOCKED ) ; // abort the normal code flow return interrupt ( ) ; } process . once ( 'exit' , function ( ) { // using "exit" ensures that it gets removed, even if there was an exception destroyFilePid ( CMD_LOCK_FILE ) ; } ) ; return loadAppStatus ( ) ; }
The user is trying to run a daemonizer command. Lock daemon command execution for the duration of the process, and return the app's current state from APP_LOCK_FILE.
The user is trying to run a daemonizer command . Lock daemon command execution for the duration of the process and return the app s current state from APP_LOCK_FILE .