shm status

Conrad Scott Conrad.Scott@dsl.pipex.com
Mon Jun 10 11:58:00 GMT 2002


"Christopher Faylor" <cgf@redhat.com> wrote:
> I can't think of any reason not to take a look at the linux version of
> ipcs and see how it makes things happen, either.  FWIW, when I do an
> strace (on linux) on ipcs -a, it seems to just be doing a bunch of
> shmctl's.  I don't think a /proc interface is really needed.

My previous post about ipcs/ipcrm on Linux was both unclear and inaccurate,
i.e. it was bollocks (in part).

The Linux shmctl(2) (et al) i/faces have been expanded w/ extra options just
for ipcs(8). To quote the manual:

> The IPC_INFO, SHM_STAT and SHM_INFO control calls are used
> by the ipcs(8) program to provide information on allocated resources.
> In the future, these may be modified as needed or moved to a proc file
> system interface.

The information ipcs(8) requires *is* now available via the /proc filesystem
in Linux (AFAICT) since it is available via the sysctl(2) i'face and that
i'face is mirrored in the /proc/kern/* files. But the current version of
ipcs(8) on Linux (util-linux-2.11r) still uses the `private' shmctl(2)
i'faces. These are only required to get the list of currently active shmids
(et al); ipcs(8) then runs down this list calling shmctl(2) (et al) on each
one.

So: my current suggestion (for the moment) is to follow that route instead,
i.e. expand the shmctl(2) i'face as required (rather than expanding the
cygwin_internal() i'face).

I hope that's as clear as anyone needs this time, and maybe even accurate
:-)

// Conrad





More information about the Cygwin-developers mailing list