commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patri...@apache.org
Subject cvs commit: jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher ParentListener.java
Date Fri, 06 Sep 2002 02:17:01 GMT
patrickl    2002/09/05 19:17:00

  Modified:    daemon/src/java/org/apache/commons/launcher
                        ParentListener.java
  Log:
  Update javadocs
  
  Revision  Changes    Path
  1.7       +9 -7      jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/ParentListener.java
  
  Index: ParentListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/java/org/apache/commons/launcher/ParentListener.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ParentListener.java	6 Sep 2002 02:03:46 -0000	1.6
  +++ ParentListener.java	6 Sep 2002 02:17:00 -0000	1.7
  @@ -93,21 +93,23 @@
   
       /**
        * Periodically check that the parent JVM has not terminated by checking
  -     * if {@link System#err} is open. If {@link System#err} is in an error
  -     * state, the parent JVM is assumed to be terminated and this method will
  -     * invoke {@link System#exit(int)}. This method <b>must</b> be executed
  -     * <b>before</b> {@link System#setErr(PrintStream)} is ever invoked.
  +     * if {@link System#out} and {@link System#err} are open. If
  +     * either stream is in an error state, the parent JVM is assumed to be
  +     * terminated and this method will invoke {@link System#exit(int)}.
  +     * This method <b>must</b> be executed <b>before</b> either
  +     * {@link System#setOut(PrintStream)} or {@link System#setErr(PrintStream)}
  +     * is ever invoked.
        * <p>
        * In addition, we check if the heartbeat file has been deleted. If so,
        * we assume the parent is requesting that this process terminate itself.
        */ 
       public void run() {
   
  -        // Save System.err in case the application invokes System.setErr()
  -        // later
  +        // Save System.out and System.err in case the application invokes
  +        // System.setOut() or System.setErr() later
           PrintStream out = System.out;
           PrintStream err = System.err;
  -        while (!out.checkError() && !err.checkError() && heartbeatFile.exists())
{
  +        while (heartbeatFile.exists() && !out.checkError() && !err.checkError())
{
               // Wait a while before the next loop
               yield();
               try {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message