Navigation Menu

Skip to content

Commit

Permalink
Report error while the initialization process
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 9, 2015
1 parent 007be06 commit 5e7c016
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/droonga-http-server
Expand Up @@ -47,6 +47,8 @@ if (options.systemLogFile && options.systemLogFile != '-') {
logger.transports.console.level = options.systemLogLevel.toLowerCase();
}

try {

if (options.pidFile) {
options.pidFile = path.resolve(baseDir, options.pidFile);
var fd = fs.openSync(options.pidFile, 'w', 0644);
Expand Down Expand Up @@ -189,3 +191,9 @@ process.on('SIGTERM', function() {
logger.info('Received a SIGTERM signal. Shutting down the server...');
shutdown();
});

}
catch(error) {
if (error)
logger.error(error);
}

0 comments on commit 5e7c016

Please sign in to comment.