You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jl...@household.com on 2002/08/20 02:09:16 UTC

Re: Reentry problems with CVS task (mabye Execute task used by composition) SOLUTION TO CORRECTION

The patch to PumpStreamHandler made changes like:

while (inputThread.isAlive()) {
      inputThread.interrupt();
      inputThread.join(TIMEOUT);
}

these should instead be:

if (inputThread.isAlive()) {
      inputThread.join(TIMEOUT);
      while (inputThread.isAlive()) {
            inputThread.interrupt();
            inputThread.join(TIMEOUT);
      }
}

>From reading the previous patches this seems to have been the intent of
Adam Sotona all along.
He started out with something similar to this and then lost the initial
wait in the later version.

Immediately interupting the thread is more likely to cause premature
closing of the thread.

P.S.:  I have placed the same information into bugzilla bug#5003.

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com


                                                                                                                                  
                                                                                                                                  
                           jlcarpenter@household       To:     "Ant Developers List" <an...@jakarta.apache.org>                 
                           .com                        cc:                                                                        
                                                       Subject:       Re: Reentry problems with CVS task (mabye Execute task used 
                           08/19/2002 03:04 PM                 by composition) CORRECTION                                         
                           Please respond to                                                                                      
                           "Ant Developers List"                                                                                  
                                                                                                                                  
                                                                                                                                  




The patch did stop the problems with execute hanging unfortunately the
patch also causes the output of my cvs log command to be prematurely
truncated.  Before applying the patch, my code would hang the second time I
executed the CVS log command but all of the output made it to my parsing
codes input buffer.  I am looking into how to solve this new problem.

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com




                           jlcarpenter@household       To:     "Ant
Developers List" <an...@jakarta.apache.org>
                           .com                        cc:

                                                       Subject:       Re:
Reentry problems with CVS task (mabye Execute task used
                           08/19/2002 01:50 PM                 by
composition) SOLVED
                           Please respond to

                           "Ant Developers List"







I ended up having to apply the patches by hand (I think they were meant for
older versions of the PumpStreamHandler and StreamPumper classes) but the
fixes work!

My 'private static PipedInputStream createCvsLogStream(Cvs cvs, String
guideFile)' method works great now, even when called more than once.  The
critical extra lines of code seem to be the:
                  while (inputThread.isAlive()) {
                        inputThread.interrupt();
                        inputThread.join(TIMEOUT);
                  }
stuff.

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com




                           "Stephane Bailliez"         To:     "Ant
Developers List" <an...@jakarta.apache.org>
                           <sbailliez@apache.org       cc:

                           >                           Subject:       Re:
Reentry problems with CVS task (mabye Execute task used
                                                               by
composition)
                           08/19/2002 11:32 AM

                           Please respond to

                           "Ant Developers List"






----- Original Message -----
From: <jl...@household.com>

> A few questions:
>
> Which patch, Attachment id=996 for Bug 5003 (the last one)?

Looks like so.

> How do I easly apply patches in this environment?  I have never had a
need
> to work extensively with patches before.  I know there are lots of clever
> tools to make this easy but I don't know what they all are.  I know that
> patches are simply diffs in a particular format but I don't know all the
> little details.

patch -i <patchfile>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>







--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>