Remove code related to DONT_WAIT_FOR_CHILD as it's now been removed.
Tidy up calls to shared_ptr.get().