Subject: JAVA application as Daemon
To: None <netbsd-users@netbsd.org>
From: None <yoskim@nmsu.edu>
List: netbsd-users
Date: 07/05/2003 13:08:07
Hello, everyone.

Happy belated Independence Day!
---------------------


I am trying to get my daemon to work still.  With the great help of people here, I 
was able to manage it to run.  However, whenever I tried to stop my daemon 
using the command 

# my_daemon stop

It simply said there ws no such daemon running.  I checked the status of it, and I 
got the same result.  I came to know that it was because my_daemon was 
actually a script that ran another program, ie. a JAVA application.  So, on the 
process table, there was no "my_daemon" running, but rather "my_JAVA" was 
running.  Thus, I now need to find a way to change the name of the 
program "my_JAVA" to "my_daemon" on the process table to be able to stop the 
daemon.  Or better yet, I need to find a better and conventional way to deal with 
this kind of situation.  How would I go about do this?

As an attempt, I had written a C program and have it run "execlp("jre", path[0], 
path[1],...);" where path[0]="my_daemon".  However, it still kept the "jre" as the 
program running on the process table.  So, it didnt work

Do I need to play with "rc" files?

Any help would be greatly appreciated.
Thank you very much.

Yosep