Fixed process kill waitpid cleanup issues.

This commit is contained in:
ravinsp
2020-09-07 14:34:07 +05:30
parent 4ad8c59051
commit f121fa90fb
5 changed files with 19 additions and 9 deletions

View File

@@ -40,7 +40,11 @@ namespace sc
// Write the inputs into the contract process.
if (feed_inputs(ctx) != 0)
{
util::kill_process(pid, true);
ctx.contract_pid = 0;
goto failure;
}
// Wait for child process (contract process) to complete execution.
const int presult = await_process_execution(ctx.contract_pid);