共有 0 个贴子
没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > javadaemontool |
javadaemontool
|
0 | 0 | 0 |
贡献者 | 讨论 | 代码提交 |
Its just a fairly small C program with no library dependencies other than libc and libcap. It starts up, backgrounds itself, and then forks to launch the java server.
The jdaemon instance stays running, writes its pid to /var/run/servername.pid, renames itself to the name of the server and then sleeps. When the Jdaemon instance is signalled with SIGTERM, it will kill off the java server and then exit.
You send it SIGTERM by calling Jdaemon again with the -k switch.
Both these calls are easily added to a /etc/init.d/skeleton script for you favourite distro.