lib: Properly use error from the restarted child, in the event of restarting.