Shared Memory Problem

Keith Crews keith at enmasse.UUCP
Thu Apr 3 01:15:44 AEST 1986


In article <367 at drivax.UUCP> holloway at drivax.UUCP (Bruce Holloway) writes:
>I'm having a problem with the shared memory routines under System V, and
>I wonder if any gurus out there could help me....
>
>I'm trying to create a shared memory segment, and put its base address into
>a structure pointer. Everything seems fine until I actually try to use
>the memory, when I get a core dump.
>
>What am I doing wrong? (My code included).
>
>    shmid = shmget(key, sizeof(MES), IPC_CREAT | IPC_EXCL);
>

You need to give access attributes on this shmget.  Eg

	IPC_CREAT | IPC_EXCL | 0666

	Keith Crews



More information about the Comp.unix.wizards mailing list