Converted from shm_open() and ftruncate() to shmget() and from mmap() to
shmat().