Playing with POSIX shared memory and semaphores