Re: [gtk-list] Re: Problem with testgtk in 1.1.13 - fonts and general
- From: Ionutz Borcoman <borco borco-ei eng hokudai ac jp>
- To: gtk-list <gtk-list redhat com>
- Subject: Re: [gtk-list] Re: Problem with testgtk in 1.1.13 - fonts and general
- Date: Thu, 21 Jan 1999 11:03:37 +0900
Owen Taylor wrote:
>
> In the latter case, the following rmshm script which
> comes with the GIMP sources (it no longer leaks segments
> but used to) may be useful.
>
> Regards,
> Owen
>
> =======
> #!/bin/sh
>
> user=`whoami`
>
> if test `uname` = "Linux"; then
> shmids=`ipcs -m | grep $user | awk '{ print $1 }'`
> IPCRM="ipcrm shm"
> else
> shmids=`ipcs -m | grep $user | awk '{ print $2 }'`
> IPCRM="ipcrm -m"
> fi
>
> for id in $shmids; do
> echo removing shared memory segment: $id
> $IPCRM $id
>
Two observations:
1. one is just typo: you need a done in the end;
2. on my Debian Linux, you need to use { print $2 } not { print $1 }.
Here is the format of my ipcs:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
However nothings seems to happen:
bash-2.01$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 13185 borco 777 32768 2 dest
0x00000000 13186 borco 777 32768 2 dest
0x00000000 13187 borco 777 32768 2 dest
0x00000000 13188 borco 777 32768 2 dest
0x00000000 13189 borco 777 32768 2 dest
0x00000000 13190 borco 777 32768 2 dest
bash-2.01$ ./rm_shared_mem.sh
removing shared memory segment: 13185
resource deleted
removing shared memory segment: 13186
resource deleted
removing shared memory segment: 13187
resource deleted
removing shared memory segment: 13188
resource deleted
removing shared memory segment: 13189
resource deleted
removing shared memory segment: 13190
resource deleted
bash-2.01$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 13185 borco 777 32768 2 dest
0x00000000 13186 borco 777 32768 2 dest
0x00000000 13187 borco 777 32768 2 dest
0x00000000 13188 borco 777 32768 2 dest
0x00000000 13189 borco 777 32768 2 dest
0x00000000 13190 borco 777 32768 2 dest
bash-2.01$
Is this meaning that I have no leaks ?Owen Taylor wrote:
Ionutz
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]