Registering PID file to be deleted on JVM exit

This commit is contained in:
Lukasz Kryger 2014-05-06 12:23:44 +01:00 committed by Dave Syer
parent 61221f84a9
commit e7484c66f5

View File

@ -80,6 +80,7 @@ public class ApplicationPidListener implements
if (created.compareAndSet(false, true)) {
try {
new ApplicationPid().write(this.file);
this.file.deleteOnExit();
}
catch (Exception ex) {
logger.warn(String.format("Cannot create pid file %s", this.file));