borrowed precondition from prefork