diff --git a/INSTALL b/INSTALL index 9c84a1f..f74c397 100644 --- a/INSTALL +++ b/INSTALL @@ -68,16 +68,14 @@ Gophernicus uses SYSV shared memory for session tracking and statistics. It creates the shared memory block using mode 600 and a predefined key which means that a shared memory block created with one user cannot be used by another user. Simply -said, running in.gophernicus as yourself will allocate that -memory, and then running the binary through inetd as another -user (nobody) will be denied access to that memory. +said, running in.gophernicus under various different user +accounts may create a situation where the memory block is locked +to the wrong user. If that happens you can simply delete the memory block and -let Gophernicus recreate it - no harm done. +let Gophernicus recreate it - no harm done: -$ su - -# ipcs -m | grep beeb -# ipcrm -M +$ sudo make clean-shm Porting to different platforms diff --git a/Makefile b/Makefile index 4c49923..ab5eee4 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,8 @@ HOSTCC = $(CC) CFLAGS = -O2 -Wall LDFLAGS = +IPCRM = /usr/bin/ipcrm + # # Platform support, compatible with both BSD and GNU make @@ -121,11 +123,14 @@ clean-build: clean-deb: if [ -d debian/$(PACKAGE) ]; then fakeroot debian/rules clean; fi +clean-shm: + if [ -x $(IPCRM) ]; then $(IPCRM) -M `awk '/SHM_KEY/ { print $$3 }' $(NAME).h` || true; fi + # # Install targets # -install: ChangeLog +install: ChangeLog clean-shm @case `uname` in \ Darwin) $(MAKE) ROOT="$(OSXROOT)" DESTDIR="$(OSXDEST)" install-files install-docs install-root install-osx install-done; ;; \ Haiku) $(MAKE) SBINDIR=/boot/common/bin DOCDIR=/boot/common/share/doc/$(PACKAGE) \