finally destroy process

This commit is contained in:
Sebastian Sdorra
2011-04-15 08:30:59 +02:00
parent bfdeac67ee
commit ea015c7e5a

View File

@@ -161,11 +161,23 @@ public class DefaultCGIExecutor extends AbstractCGIExecutor
} }
} }
Process p = Runtime.getRuntime().exec(execCmd, environment.getEnvArray(), Process p = null;
try
{
p = Runtime.getRuntime().exec(execCmd, environment.getEnvArray(),
workDirectory); workDirectory);
execute(p); execute(p);
} }
finally
{
if (p != null)
{
p.destroy();
}
}
}
/** /**
* Method description * Method description