clean shm before exit