Xref: utzoo comp.sys.mips:1687 comp.unix.questions:31828 Newsgroups: comp.sys.mips,comp.unix.questions Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!cass.ma02.bull.com!mips2!rws1!mwarren From: mwarren@rws1.ma30.bull.com (Mark Warren) Subject: Problem with access to shared memory Organization: Bull HN Informations Systems Inc. Date: 31 May 91 12:23:32 GMT Message-ID: Sender: @mips2.ma30.bull.com In Mips RISC/os 4.52, I have a program which allocates shared memory regions, and would like to have the regions attached RDONLY sometimes, and READ-WRITE at other times. Essentially, it does: id = shmget(key, size, (IPC_CREAT | 0600)); addr = shmat(shmid, 0, 0); strcpy(addr, "some stuff"); shmdt(addr); addr = shmat(shmid, 0, SHM_RDONLY); strcpy(addr, "some other stuff"); I expect the second strcpy to fail with a SIGSEGV or SIGBUS, but instead it succeeds. What am I doing wrong? -- == Mark Warren Bull HN Information Systems Inc. == == (508) 294-3171 (FAX 294-3020) 300 Concord Road MS836A == == M.Warren@bull.com Billerica, MA 01821 ==