From owner-freebsd-current Wed Mar 1 10: 0:30 2000 Delivered-To: freebsd-current@freebsd.org Received: from host.cer.ntnu.edu.tw (cer.ntnu.edu.tw [140.122.119.9]) by hub.freebsd.org (Postfix) with ESMTP id 93A3637B817 for ; Wed, 1 Mar 2000 09:59:37 -0800 (PST) (envelope-from clive@host.cer.ntnu.edu.tw) Received: (from clive@localhost) by host.cer.ntnu.edu.tw (8.9.3/8.9.3) id CAA06737; Thu, 2 Mar 2000 02:01:21 +0800 (CST) (envelope-from clive) Date: Thu, 2 Mar 2000 02:01:20 +0800 From: Clive Lin To: Alfred Perlstein Cc: Cliff Rowley , Christopher Masto , freebsd-current@FreeBSD.ORG Subject: Re: Shared memory - Was: 2 Queries Message-ID: <20000302020119.A5176@host.cer.ntnu.edu.tw> Reply-To: Clive Lin References: <20000229134143.B4903@netmonger.net> <20000301075833.R21720@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000301075833.R21720@fw.wintelcom.net> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Mar 01, 2000 at 07:58:34AM -0800, Alfred Perlstein wrote: > > It'd be nice if we had a utility that could clean out and reclaim the > > shared memory in 1 swoop. Then we'd be able to shut down XFree86 (and > > obviously any other apps using shared memory), and get on with life :) > > > > (anyone listening?) > > er, yes this is entirely possible. > > If you want to clear SHM then use 'ipcs' to list and 'ipcrm' to delete. > > I used to have a shell script to do this, but i don't know where it > went. Hi, I dont' know if this meet what you described, but I use a single line to clean un-referenced shared memory. x.sh: #!/bin/sh ipcs | awk '{if ($5 == ENVIRON["USER"]) system("ipcrm -m" $2)}' Before applying 3 options posted by ade lovett into my kernel, most heavy gtk programs like xmms, gimp, gnome-controlcenter...etc, will die with whole X crashing. (I invoke X with gnome-session, what the gnome document said) Thus I have to run x.sh whenever my X crashed with share memory bodiz *shurg* /.\ -- CirX - This site doesnt' exist. 9c k9o h9 s1bg s1f, 7v .y xqx a sj m8r ffg1 vg5 a6 asox tmul h38. ant sj m8r ob ? 1fj mwby a1 tao vg5. soq df v' .a. CirX. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message