Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
fix(*nix): Keeps only the name of the process
Browse files Browse the repository at this point in the history
As described in sorellabs/fuck-you#18, OS/X
lists the full path of the proccess in `ps axo pid,comm`. For now we
only care about the name of the process (might add the path later!), so
we make sure that we're only keeping that
  • Loading branch information
robotlolita committed May 17, 2015
1 parent 552d6df commit b6d819e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/linux.js
Expand Up @@ -7,6 +7,7 @@
// -- Dependencies -----------------------------------------------------
var shell = require('./utils').shell;
var K = require('core.lambda').constant;
var path = require('path');


// -- Implementation ---------------------------------------------------
Expand All @@ -30,7 +31,7 @@ function list() {
if (match == null) {
return null;
} else {
return { name: match[2], pid: Number(match[1]) };
return { name: path.basename(match[2]), pid: Number(match[1]) };
}
})
.filter(Boolean);
Expand Down

0 comments on commit b6d819e

Please sign in to comment.