From: joel@decwrl.dec.com (Joel McCormack)
Subject: Re: Shared Memory remains when using local:0 for X under DEC OSF/1
Date: 20 Aug 1993 01:37:22 GMT [thread overview]
Message-ID: <2519si$dsj@usenet.pa.dec.com> (raw)
The old MIPS local:0 shared memory code did not leave segments lying around.
The OSF code does. Upon further investigation, Sam Hsu discovered the
following code in the shared memory transport:
sds.shm_perm.mode = 0; /* for security */
shmctl(chan->smid, IPC_SET, &sds);
/* I don't understand what this is doing
* shmctl(chan->smid, IPC_RMID, 0);
*/
The commented-out code wasn't commented out on Ultrix, and ``removed'' the
shared memory segment. But like files that have been removed, the shared
memory doesn't really go away until all references go away. With this code
commented out, it segment stays, because the shared memory semantics say that
you have to leave the segment lying around, just in case some program might
want to link to it later.
We hope that reuncommenting the code (and putting in an explanatory comment
above it, so that this problem never reoccurs) will fix the problem on OSF,
and we'll try to contact the appropriate release people to get this fix out
as soon as possible.
In the meantime, here's a quick and dirty script that will get rid of a lot of
your defunct shared memory segments:
set a=""
foreach n (`ipcs -m | sed '1,/MODE/d' | awk '{ print $2 }'`)
set a="$a -m $n"
end
if ( "$a" != "" ) then
ipcrm $a
endif
--
- Joel McCormack (decwrl!joel, joel@decwrl.dec.com)
next reply other threads:[~1993-08-20 1:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-08-20 1:37 Joel McCormack [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-08-14 23:19 Shared Memory remains when using local:0 for X under DEC OSF/1 Cris Circle
1993-08-16 21:04 ` Martin Mohring
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox