mark for dead pids and removing all runnings in progress