Currently in the code, we are handling both SIGKILL and SIGTERM as equivalent for docker containers. However, they should actually be separate. When YARN sends a SIGKILL to a process, it means for it to die immediately and not sit around waiting for anything. This ensures an immediate reclamation of resources. Additionally, if a SIGTERM is sent before the SIGKILL, the task might not handle the signal correctly, and will then end up as a failed task instead of a killed task. This is especially bad for preemption.