Date: Mon, 10 Dec 2007 09:30:42 +1100 From: Edwin Groothuis <edwin@freebsd.org> To: arch@freebsd.org Subject: bin/118292: Add support to remove all msg/shm/sem ids with ipcrm Message-ID: <20071209223042.GA40965@k7.mavetju>
next in thread | raw e-mail | index | archive | help
Hello,
A friend of me has submitted this PR and I promised him that I would
see if I could get it implemented. I couldn't find anybody directly
responsible for the ips/iprcm tools, so I throw it in here for
discussion.
>Description:
I've observed that linux apps running under the linuxulator
have a habit of leaving behind shared memory segments which are
unused, but which eventually cause the system to run out of
free segments and these apps will stop working. ipcrm(1) currently
only allows removal of unused message queues, shared memory
segments and semaphores on an individual basis, or those having
a matching (non-zero) key. However it would often be convenient
to just do a complete cleanup of everything, usually as root.
The attached patch allows removal of all message queues, shared
memory segments or semaphores by specifying an id of -1 (ala
kill(2)). The code to lookup ids was taken from ipcs.
The patch is available in http://www.freebsd.org/cgi/query-pr.cgi?pr=118292
I will do it in two parts (according to the wishes of my mentor):
First style(9)ify ipcrm.c, then the patch.
If anybody has a good observation on this change, please speak up now.
Edwin
--
Edwin Groothuis
edwin@freebsd.org
http://www.mavetju.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071209223042.GA40965>
