G
googlepost
Hi,
I am trying to execute an '.exe' through Runtime.exec() and trying to
read the exit value in a while loop.
while (goodexitvalue || timeoutReached)
{
// Read i/p stream if available
// Read error stream if available
try
{
process.exitValue();
}
catch (IllegalThreadStateException e)
{
// the while continues until good value or timeout reached.
}
}
Shutdown process.
================
workerthread.join(10 secs) // HANGS !!!
Meanwhile, a shutdown of the main agent happens, and the threadpool
tries to shutdown its worker threads and does a join(10 secs), one of
which is the one with the 'while loop'. This worker thread join hangs
while we get a IIlegalThreadStateException() on the worker thread.
Any help is appreciated.
Thnx
I am trying to execute an '.exe' through Runtime.exec() and trying to
read the exit value in a while loop.
while (goodexitvalue || timeoutReached)
{
// Read i/p stream if available
// Read error stream if available
try
{
process.exitValue();
}
catch (IllegalThreadStateException e)
{
// the while continues until good value or timeout reached.
}
}
Shutdown process.
================
workerthread.join(10 secs) // HANGS !!!
Meanwhile, a shutdown of the main agent happens, and the threadpool
tries to shutdown its worker threads and does a join(10 secs), one of
which is the one with the 'while loop'. This worker thread join hangs
while we get a IIlegalThreadStateException() on the worker thread.
Any help is appreciated.
Thnx