Try to be robust against fork.