modules/tetra: port Cod's killonfailoper