Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Implement kill -9 using TerminateProcess, or provide TerminateProcess #6146
Original bug ID: 6146
I implemented terminate_process like this:
CAMLprim value o_terminate_process(value o_pid)
// The implementation of Unix.create_process returns the Handle as PID.
external terminate_process: int -> bool = "o_terminate_process"
I figured I might as well share the code. This could be used either to implement Unix.kill at least for signal SIGKILL. Or, a new function terminate_process could be provided. Just like create_process exists to simulate the Windows function CreateProcess using the Unix function fork, the terminate_process would exist to simulate the Windows function TerminateProcess using the Unix function kill.