Consider setting a descriptive program name
Follow up from the small scale survey at https://discourse.gnome.org/t/should-tracker-be-rebranded/10937
It's technically possible to modify the name that appears in top
, here's an example program showing how you do that on Linux:
#include <sys/prctl.h>
int main(int argc, char *argv[]) {
const char name[16] = "search indexer\0";
prctl(PR_SET_NAME, &name, 0, 0, 0);
while (1) {
// Now we will appear in `top` :-)
}
}
On BSD we can probably use setproctitle
.
Thoughts:
- We are limited to 16 characters on Linux, enough to say "search indexer" but not enough for "search indexer (tracker-miner-fs-3)"
- This could be counterproductive, as searching online for
tracker-miner-fs-3
shows results for what the process is, while searching online for "search indexer" (for example) does not.