This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Improved (?) cygserver available

I've recently been working on the nascent cygserver project, initially
due to the efforts of Egor Duda and Robert Collins.  The changes so
far are include both generic changes to the server process itself,
mostly to make it a lot more robust, and also a re-implementation of
sysv shm sub-system.

I've just checked a whole swathe of changes into the CVS repository on
the cygserver_daemon branch. I've only got access to a win2k machine
for development and testing so I would greatly appreciate it if people
could take the time to run this on other MS systems. Nicholas Wourms
has run previous versions on his WinMe system (thanks!), so I think it
should have a good chance of running on most varieties of Windows and
NT. (Famous last words.)

The current status of the new sysv shm implementation is that it is
99% Posix compliant except for security; so it's complete for non-NT
systems :-)

Known issues:

*) If a process dies without detaching from a shared memory segment,
you have to kill cygserver to get rid of it. This will be fixed RSN
(Rob added the relevant hooks, I've just yet to make use of them).

*) If you attach the same segment repeatedly without giving a base
address, it gets attached at the *same* address each time, which I
don't think is quite right. I need to check some other Posix
implementation to see what they do with this.

*) No security. But I already mentioned that and it's the next task
(after learning a lot more about the NT security model).

*) Apart from that, I believe the shm implementation is
Posix-compliant. But I expect someone to prove me wrong :-)

If you want to explore this version of cygserver, you'll need to get
the source from the cygwin_daemon branch in CVS (using "cvs co -r
cygwin_daemon winsup", or similar) and compile it up for yourself. If
there's a demand (and no-one objects), I'll place a pre-compiled
snapshot on my homepage.

Apart from just downloading the source, you will also need to take the
following steps to get a working system:

*) Apply the attached "sys-types.patch" to
src/newlib/libc/include/sys/types.h to change `key_t' to be 64-bit.

*) Apply the attached "cygwin-din.patch" to
src/winsup/cygwin/cygwin.din to add the shm entry points to the DLL.

*) Copy src/winsup/cygwin/cygwin_{ipc,shm}.h to
/usr/include/sys/{ipc,shm}.h (or somewhere else appropriate) and apply
the attached "sys-shm.patch" to the copied shm.h file. (NOTE: The
<sys/shm.h> headers are not binary compatible between this release and
the previous one announced by Robert in You must
copy the /usr/include/sys headers again and re-compile any programs.)

Apart from that, the main idea is to try it and have fun. Patches,
fixes, bug reports, bribes, etc. are all welcome :-)  I already know
that I can kill cygserver if I have 50 clients each with 10 threads,
all issuing multiple shm requests: but I've not got it to fail for
anything more reasonable. And I'll be fixing that RSN too.

The test programs distributed by Robert in his previous announcement
( are
still valid for the present version.

Have fun.

// Conrad

Attachment: sys-types.patch
Description: Binary data

Attachment: cygwin-din.patch
Description: Binary data

Attachment: sys-shm.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]