As a follow-up to my last post regarding shm_attach and its limit capability for knowing how it was created....
for more control, use the shmop_* series of functions, as they have finer grained control than these.
and by the way: the SHMOP functions SHOULD BE listed under "see also" for all the SHM* wrapper functions (I assume they are wrappers to the SHMOP* functions).