+ // CONTROL
+ public synchronized Boolean isRunning() {
+ return currentWatchdog != null;
+ }
+
+ private synchronized ExecuteWatchdog createWatchdog() {
+ if (currentWatchdog != null)
+ throw new SlcException("A process is already being monitored");
+ currentWatchdog = new ExecuteWatchdog(watchdogTimeout);
+ return currentWatchdog;
+ }
+
+ private synchronized void releaseWatchdog() {
+ currentWatchdog = null;
+ }
+
+ public synchronized void kill() {
+ if (currentWatchdog != null)
+ currentWatchdog.destroyProcess();
+ }
+