From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,30e5f7736d79e134 X-Google-Attributes: gidfa528,public X-Google-Thread: 1020c6,30e5f7736d79e134 X-Google-Attributes: gid1020c6,public X-Google-ArrivalTime: 2001-03-19 13:24:07 PST From: dbs900@anu.edu.au (David Singleton) Subject: Re: Process <-> Shared Memory Newsgroups: comp.unix.admin,comp.unix.tru64 References: <3AAFC427.2C57DEF0@hotmail.com> <3AB60351.BD59CFA1@t-online.de> <3AB63FEF.D4896273@hotmail.com> Organization: ANU Supercomputer Facility NNTP-Posting-Host: 150.203.5.2 X-Original-NNTP-Posting-Host: 150.203.5.2 Message-ID: <3ab678aa$1@clarion.carno.net.au> Date: 20 Mar 2001 08:22:50 +1000 X-Trace: 20 Mar 2001 08:22:50 +1000, 150.203.5.2 Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!209.81.14.120!feeder.via.net!enews.sgi.com!newspeer.cwnet.com!sjc1.nntp.concentric.net!newsfeed.concentric.net!newsfeed.ozemail.com.au!news1.optus.net.au!optus!clarion.carno.net.au!dbs900 Xref: supernews.google.com comp.unix.admin:9279 comp.unix.tru64:1890 In article <3AB63FEF.D4896273@hotmail.com>, Mario Stargard writes: |> ipcs -a tells you how many processes are attached (NATTCH) to the |> shared memory segment, who the creating pid (CPID) was and the last pid |> (LPID) to attach to the segment. This doesn't tell you the pids of the |> currently attached processes, which is what I'm looking for. |> Thanks, though. |> |> Mario |> Just to make it clear what Mario and I are after, /proc/pid/map under Solaris returns an array of typedef struct prmap { uintptr_t pr_vaddr; /* virtual address of mapping */ size_t pr_size; /* size of mapping in bytes */ char pr_mapname[PRMAPSZ]; /* name in /proc/pid/object */ offset_t pr_offset; /* offset into mapped object, if any */ int pr_mflags; /* protection and attribute flags */ int pr_pagesize; /* pagesize for this mapping in bytes */ int pr_shmid; /* SysV shared memory identifier */ } prmap_t; which conveniently gives the required info as the last component. The only clue I have found is that the address in the corresponding struct under Tru64 is very small - not something to rely on :^) ------ David.Singleton@anu.edu.au ANU Supercomputer Facility Phone: +61 2 6125 4389 Australian National University Fax: +61 2 6125 8199 Canberra, ACT, 0200, Australia