change in shmwrite.c