in reply to shared memory problems

OK, all sorted. To answer my own question:
use ipcs to identify the shared memory segment/semaphore
use ipcrm -m shmid -s semkey to clear memory/semaphores
Thank you o'Reilly!