check shmctl return statement

this may fix some crash