If XShmAttach fails then reset shmid to -1 so that we don't try to use