A test code for semaphore and shared memory between processes in UNIX