Permalink
Browse files

better title for the worker

  • Loading branch information...
1 parent 9e690ec commit 4b7bb1460f5218744df7bd67d3e6f73efcafe2d3 Joachim Kainz committed Oct 2, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/backgrounder-launcher.js
View
8 lib/backgrounder-launcher.js
@@ -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.