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,10 +161,22 @@ 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();
}
}
} }
/** /**