make sure lock only sets dontkillme in child context.