[LC++]Getting shared memory segments ...
Jack Lloyd
lloyd at acm.jhu.edu
Tue Jun 3 22:44:02 UTC 2003
See how ipcs does it. :)
Though to be honest, I just looked at what `strace ipcs` says, and it looks
like it's doing something really hairy involving UDP sockets. It may be
easier to just execute `ipcs` and parse the output. Probably somewhat more
portable, too.
-Jack
On Mon, 2 Jun 2003, Sandro Santos Andrade wrote:
>
> Hi all,
>
> I need to list in my program all the shared memory segments available on
> system, like the
> ipcs output. Searching for systems calls I had no success, finding just some
> primitives like
> ipc() and ipc_get() in the kernel source code. How can I get all the shared
> memory segments
> without an specific shared memory key ?
> Are there any system call that implement this ? How can I achieve this
> results ?
>
> Thanks in advance,
> Sandro
>
>
> _______________________________________________
> This is the Linux C++ Programming List
> : http://lists.linux.org.au/listinfo/tuxcpprogramming List
>
More information about the tuxCPProgramming
mailing list