Shared Memory in BSD4.3 is lacking?

John Marvin jsm at hpfcdc.HP.COM
Tue Mar 1 03:25:17 AEST 1988


> There should be a way to cause private shared memory segments
> to vanish upon termination of a process or process group.

There is a way. Just call shmctl() to remove the id immediately after
calling shmat() to attach the private segment. This will cause the memory
segment to vanish when the last process that has it attached exits. This
also works for "public" shared memory, but it sort of defeats the purpose
of it being "public".

	John Marvin
	jsm%hpfcla at hplabs.hp.com



More information about the Comp.unix.wizards mailing list