Avoid exceptions due to 'fork' being called as a hook