Patches for Detect a process that enters an infinite loop. [sf#2794120] [#974]