Author: sebb
Date: Thu Apr 22 20:26:48 2010
New Revision: 937045
URL: http://svn.apache.org/viewvc?rev=937045&view=rev
Log:
start() method in JVM mode is supposed to wait for the process to finish
Modified:
commons/proper/daemon/trunk/src/samples/ProcrunService.java
Modified: commons/proper/daemon/trunk/src/samples/ProcrunService.java
URL:
http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/ProcrunService.java?rev=937045&r1=937044&r2=937045&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/samples/ProcrunService.java (original)
+++ commons/proper/daemon/trunk/src/samples/ProcrunService.java Thu Apr 22
20:26:48 2010
@@ -104,11 +104,19 @@ public class ProcrunService implements R
}
/**
- * Start the jvm version of the service.
+ * Start the jvm version of the service, and waits for it to complete.
+ *
* @param args optional, arg[0] = timeout (seconds)
*/
public static void start(String [] args) {
startThread(getArg(args, 0), null);
+ while(thrd.isAlive()){
+ try {
+ thrd.join();
+ } catch (InterruptedException ie){
+ // Ignored
+ }
+ }
}
private static void startThread(String waitParam, File file) {