Changed the behaviour of terminating and killing.

It doesn't make sense to kill a process after 5 seconds, even if it has exited before.