I'm working on a daemon written in Java. I want to figure out a way I can still run /usr/bin/java but when using top/ps it shows a different name. I've tried creating a hardlink and a symbolic link to java and calling the link instead of java itself but no such luck.

I wouldn't be surprised if it's not possible to do this but I figured I'd see if any gurus on here knew. The distribution is Debian 5. The reason I want to do this is so it's easier to figure out which process is related to the daemon without checking the pid file.

Thanks in advance

link|improve this question

What is the "different name" it is showing? – Zypher Dec 16 '09 at 19:20
It's showing "java" which obviously makes sense since java is running. I'm just hoping that "maybe" there is a way to mask it by symlinks or something similar so it shows a different app name. – William Dec 16 '09 at 19:45
Similar question: stackoverflow.com/questions/882826/… – Dennis Williamson Dec 16 '09 at 19:58
feedback

1 Answer

up vote 1 down vote accepted

bash % exec -a "myprogram" java myprogram

link|improve this answer
I forgot to mention that I'm using start-stop-daemon. I'm accepting your answer since I wasn't specific. – William Dec 16 '09 at 20:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.