allow cleanup to be performed when process exits

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>