ioi/isolate

Perform custom action before process kill

jaideep-cn opened this issue · 1 comments

What I basically need to do is persist some custom data to the host system before the process running inside the isolate box is killed on the time limit being exceeded.

From what I understood from reading the code, a SIGKILL signal is sent to kill the process which forcefully terminates the process. I think that signal would have to be changed to a SIGTERM signal which can be handled by the process to perform the action.

Not sure how would the timing work in this case and how I might eventually need to kill the process forcefully.
Can someone please guide me on how to proceed with this?

The raison d'être of Isolate is to run untrusted code. The whole process inside the sandbox is assumed to be at best buggy and and worst outright malicious. Therefore relying on the inside process to perform any cleanup does not make sense.