Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Message-ID: <00f401c21ed8$a1463fa0$6132bc3e@BABEL> From: "Conrad Scott" To: , Cc: "Nicholas Wourms" Subject: Improved (?) cygserver available Date: Fri, 28 Jun 2002 20:18:48 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00EF_01C21EE1.02ABE5D0" X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Note-from-DJ: This may be spam This is a multi-part message in MIME format. ------=_NextPart_000_00EF_01C21EE1.02ABE5D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 the 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 headers are not binary compatible between this release and the previous one announced by Robert in http://cygwin.com/ml/cygwin-developers/2002-03/msg00000.html. 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 (http://cygwin.com/ml/cygwin-developers/2002-03/msg00000.html) are still valid for the present version. Have fun. // Conrad ------=_NextPart_000_00EF_01C21EE1.02ABE5D0 Content-Type: application/octet-stream; name="sys-types.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="sys-types.patch" Index: types.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/newlib/libc/include/sys/types.h,v=0A= retrieving revision 1.15=0A= diff -u -r1.15 types.h=0A= --- types.h 27 Jun 2002 22:48:01 -0000 1.15=0A= +++ types.h 28 Jun 2002 18:50:06 -0000=0A= @@ -160,7 +160,11 @@=0A= #endif=0A= =0A= typedef int pid_t;=0A= +#if defined (__CYGWIN__)=0A= +typedef long long int key_t;=0A= +#else=0A= typedef long key_t;=0A= +#endif /* __CYGWIN__ */=0A= typedef _ssize_t ssize_t;=0A= =0A= #ifdef __MS_types__=0A= ------=_NextPart_000_00EF_01C21EE1.02ABE5D0 Content-Type: application/octet-stream; name="cygwin-din.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cygwin-din.patch" Index: cygwin.din=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v=0A= retrieving revision 1.52=0A= diff -u -r1.52 cygwin.din=0A= --- cygwin.din 11 Jun 2002 02:08:00 -0000 1.52=0A= +++ cygwin.din 28 Jun 2002 18:50:55 -0000=0A= @@ -1272,3 +1272,8 @@=0A= _acltotext =3D acltotext=0A= aclfromtext=0A= _aclfromtext =3D aclfromtext=0A= +ftok=0A= +shmat=0A= +shmctl=0A= +shmdt=0A= +shmget=0A= ------=_NextPart_000_00EF_01C21EE1.02ABE5D0 Content-Type: application/octet-stream; name="sys-shm.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="sys-shm.patch" --- cygwin_shm.h 2002-06-27 21:24:29.000000000 +0100=0A= +++ /usr/include/sys/shm.h 2002-06-27 23:52:00.000000000 +0100=0A= @@ -12,7 +12,7 @@=0A= #ifndef _SYS_SHM_H=0A= #define _SYS_SHM_H=0A= =0A= -#include "cygwin_ipc.h"=0A= +#include =0A= =0A= #ifdef __cplusplus=0A= extern "C"=0A= ------=_NextPart_000_00EF_01C21EE1.02ABE5D0--