Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Merge pull request #24 from mennopruijssers/non-root
Browse files Browse the repository at this point in the history
Don't check for root
  • Loading branch information
danielheller committed Aug 20, 2015
2 parents eee516b + ed4c04f commit 745a79b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cmd/torch.js
Expand Up @@ -49,11 +49,6 @@ function die(msg) {
process.exit(1);
}

// Should really be geteuid
function amIRoot() {
return process.getuid() === 0;
}

function pidExists(pid) {
// jscs:disable disallowKeywords
try {
Expand Down Expand Up @@ -135,10 +130,6 @@ function outputDTraceText(stacks) {
}

function main() {
if (!amIRoot()) {
die('Root privileges required.');
}

var args = parseArgs(process.argv);
if (!pidExists(args.pid)) {
die(util.format('Process %d does not exist.', args.pid));
Expand Down Expand Up @@ -168,7 +159,6 @@ if (require.main === module) {
process.nextTick(main);
} else {
module.exports = {
amIRoot: amIRoot,
parseArgs: parseArgs,
pidExists: pidExists
};
Expand Down

0 comments on commit 745a79b

Please sign in to comment.