🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #23771

Re: shared memory extension (MIT-SHM)

#23771
From: Burkhard Neidecker-Lutz
Date: Mon, 17 Jun 1991 08:50
26 lines
1748 bytes
The XShmQueryExtension call has no way of actually knowing whether it
will be able to honor the following requests for MITSHM connects
to a server other than whether the server supports the extension
as such. It's pretty difficult to tell whether the application
runs on the same host (don't suggest looking in IP-specific structures
to tell, I might connect via a DECnet link...). 

Why ? Because even if it knew you are on the same machine, you
still might be unable to actually get what you request (true of
X resources in general, but much more likely so in the case of MITSHM).

At least on my variant of UNIX, the number of shared memory segments 
a process (and hence, the X server) can have, is limited to a fairly
small number, so after a few connects, you run out of slots to attach
the client to the server.

The approach we used finally was to ask the server if it offered
MITSHM and then setting the XErrorHandler around the actual allocation.
Instead of crashing we would get to know silently whether we failed
(our error handler set's a flag) and could take appropriate action
(i.e. fall back to the no-MITSHM) case. Ugly, but very robust.


			Burkhard Neidecker-Lutz, Digital Equipment Corp.
			CEC Karlsruhe, Project NESTOR
Technical Details
Message-ID: <1991Jun17.085039.21331@pa.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!kaputt!neideck
References: <4186@island.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!kaputt!neideck
From: neideck@kaputt.enet.dec.com (Burkhard Neidecker-Lutz)
Newsgroups: comp.windows.x
Subject: Re: shared memory extension (MIT-SHM)
Message-ID: <1991Jun17.085039.21331@pa.dec.com>
Date: 17 Jun 91 08:50:39 GMT
References: <4186@island.COM>
Sender: news@pa.dec.com (News)
Organization: CEC Karlsruhe
Lines: 26