commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r937045 - /commons/proper/daemon/trunk/src/samples/ProcrunService.java
Date Thu, 22 Apr 2010 20:26:49 GMT
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) {



Mime
View raw message