Merge remote-tracking branch 'origin/master'

This commit is contained in:
Matt 2014-05-12 11:15:36 -06:00
commit d6ee15e8f0
1 changed files with 9 additions and 0 deletions

View File

@ -51,6 +51,15 @@ try{
if (cluster.isMaster)
logger.warning('POSIX', 'Connection Limit', '(Safe to ignore) Must be ran as root to increase resource limits');
}
finally {
// Find out which user used sudo through the environment variable
var uid = parseInt(process.env.SUDO_UID);
// Set our server's uid to that user
if (uid) {
process.setuid(uid);
logger.debug('POSIX', 'Connection Limit', 'Raised to 100K concurrent connections, now running as non-root user: ' + process.getuid());
}
}
}
catch(e){
if (cluster.isMaster)