Hello Hubert,
the kill session doesn't really terminates the kernel task.
It only sends a cancel request to the kernel and terminates the connection.
The kernel self checks for this cancel request and terminates the task.
It is a good will action and should ensure consistency.
On an infinite loop in case of an errror the cancel byte will never check.
Kind regards,
Burkhard
btw. ODBC reconnects automatically with the next command if it has detected connection problems.