Ralf,

Could you try moving the CheckForRunningIPCDaemon function to hw/xwin/winshm.c/winCheckForRunningIPCDaemon ? I am just thinking that the patch is more likely to get included if it doesn't clutter extension files with Cygwin-specific stuff.

Harold

Ralf Habacker wrote:
Ralf --
  What happens when you run your cygipc-based build of X11, but do not
have the ipc-daemon running?  You can't run KDE, of course, but does the
Xserver itself still work properly?  Can non-KDE X apps work?


Xfre has build in support for disabling XIT-SHM support in cases the kernel does not support it. See http://www.atomised.org/docs/XFree86-4.2.1/shm_8c-source.html

xc/programs/Xserver/xext/shm.c
<snip>

void
ShmExtensionInit()
{ ExtensionEntry *extEntry; int i; #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) if (!CheckForShmSyscall()) { ErrorF("MIT-SHM extension disabled due to lack of kernel support\n"); return; } <snip>


Because the cypipc produces a valid return code ENOSYS in cases the ipc-daemon isn't available, see http://www.cygwin.com/ml/cygwin/2002-11/msg00136.html, there is only a simple checker functions needed to check the state of the ipc-daemon and enable/disable shm functions.

The appended patch implemented this support for the xfree server.

See the result:

cd ~/src/xc/programs/Xserver
$ killall ipc-daemon $ ./XWin.exe &
$ xdpyinfo | grep MIT-SHM


$ killall XWin $ ipc-daemon & $ ./XWin.exe &
$ xdpyinfo | grep MIT-SHM MIT-SHM


Hope that helps

cheers Ralf



--
Chuck


Harold L Hunt II wrote:



Well, that makes it easy. SHM will not be supported by this new build.

Harold

Christopher Faylor wrote:


On Thu, Sep 04, 2003 at 04:45:34PM -0400, Harold L Hunt II wrote:


I am not sure. How "automagically" is the IPC daemon installed? If it requires user intervention, then we cannot really have XShm in the default install.



You could make it a setup.hint dependency, of course, but that's only half the battle. The next step would be to get the cygipc daemon started. I don't think you want to go through that pain unless there is a clean fallback for when cygipc isn't working right.






Reply via email to