Add cleanup to be used around forking.

Change-Id: Ic434d932bfd02dd0933ef675f87edbb8cb0dff1e