Skip to content

Commit

Permalink
better title for the worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Joachim Kainz committed Oct 2, 2011
1 parent 9e690ec commit 4b7bb14
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/backgrounder-launcher.js
Expand Up @@ -189,10 +189,16 @@ process.send = function(message, id) {
process.stdout.write(json + '\n');
};
console.info = console.log;

function getTitle(worker) {
var pos = worker.lastIndexOf('/');
return worker.substr(pos+1);
}
//
// Load the module the users wanted to load
//
var worker = process.argv[2];
var title = getTitle(worker);

process.title = worker;
process.title = title;
require(worker);

0 comments on commit 4b7bb14

Please sign in to comment.