ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal Hildebrand \(web\)" <Hal.Hildebr...@hellblazer.com>
Subject Re: Execute task not handling InterruptedException
Date Fri, 28 Jun 2002 22:47:36 GMT
Whooops...  Sorry.  Of course.

----- Original Message -----
From: "Steve Loughran" <steve_l@iseran.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, June 28, 2002 3:38 PM
Subject: Re: Execute task not handling InterruptedException


> you could be right. Would you mind opening a bug on the subject.
>
> ----- Original Message -----
> From: "Hal Hildebrand (web)" <Hal.Hildebrand@hellblazer.com>
> To: "Ant Users List" <ant-user@jakarta.apache.org>
> Sent: Friday, June 28, 2002 15:00
> Subject: Execute task not handling InterruptedException
>
>
> > The Execute task has a bug in:
> >
> >     protected void waitFor(Process process) {
> >         try {
> >             process.waitFor();
> >             setExitValue(process.exitValue());
> >         } catch (InterruptedException e) {}
> >     }
> >
> > If the Execute task is interrupted, what happens is that in
execute(),
> > because the InterruptedException is ignored, the process is assumed
to
> > have completed normally, and is removed from the ProcessDestroyer.
This
> > means the processes are still hanging around and no shutdown thread
is
> > going to kill them
> >
> > One way to handle it is to throw the interrupted exception from
> > waitFor() and handle it correctly in execute.  By correctly handling
it
> > I mean that if the thread is interrupted, process.destroy() must be
> > called - i.e. the process shouldn't be hanging around waiting for
the
> > shutdown hook to kill it.
> >
> > Cheers
> >
> > -Hal
> > ______
> > science does not remove the terror of the gods
> > www.hellblazer.com
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
>
>
>


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


Mime
View raw message