Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 05 Nov 2002 10:38:41 -0500 From: Jason Tishler Subject: RFD: cygipc ENOSYS patch To: Cygwin Mail-followup-to: Cygwin Message-id: <20021105153841.GA1756@tishler.net> MIME-version: 1.0 Content-type: multipart/signed; boundary=eHhjakXzOLJAF9wJ; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-disposition: inline User-Agent: Mutt/1.4i --eHhjakXzOLJAF9wJ Content-Type: multipart/mixed; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 30, 2002 at 08:35:41PM +0100, Peter Eisentraut wrote: > I'm getting tired of the "initdb hangs" class of complaints. Why > doesn't the relevant function fail if the ipc-daemon isn't running? > Can anything be done in that area? Motivated by the above, I finally looked into this long standing Cygwin PostgreSQL problem. Specifically, Cygwin PostgreSQL will hang and consume all available CPU cycles if cygipc's ipc-daemon is not running when either initdb or postmaster is started. I'm proposing that the attached patch (against cygipc-1.11-1) be applied to cygipc since it solves the Cygwin PostgreSQL hang problems. Specifically, this patch changes cygipc's shmget() and semget() to return ENOSYS instead of EACCES if ipc-daemon is not running. However, I'm concerned that this change could adversely affect other applications (e.g., Cygwin KDE) that rely on cygipc. Would a such a user be willing to try a pre-built, already patched version of cygipc? If so, then this package can be found at: http://www.tishler.net/jason/software/cygipc/ Please report your findings to the Cygwin list. If interested, see the following PostgreSQL mailing thread (which is split over two months) for supporting information: http://archives.postgresql.org/pgsql-cygwin/2002-10/msg00067.php http://archives.postgresql.org/pgsql-cygwin/2002-11/msg00008.php Thanks, Jason --=20 GPG key available on key servers or http://www.tishler.net/jason/gpg.txt --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cygipc-1.11-1p1.patch" Content-Transfer-Encoding: quoted-printable diff -rup cygipc-1.11-1.orig/sem.c cygipc-1.11-1p1/sem.c --- cygipc-1.11-1.orig/sem.c 2001-11-26 18:41:32.000000000 -0500 +++ cygipc-1.11-1p1/sem.c 2002-11-05 09:25:37.000000000 -0500 @@ -326,8 +326,8 @@ debug_printf("semget : return -EINVAL\n" =20 if (sem_connect() =3D=3D 0) { -debug_printf("semget : return -EACCES\n"); - CYGWIN_IPCNT_RETURN (-EACCES) ; +debug_printf("semget : return -ENOSYS\n"); + CYGWIN_IPCNT_RETURN (-ENOSYS) ; } =20 if (key =3D=3D IPC_PRIVATE) diff -rup cygipc-1.11-1.orig/shm.c cygipc-1.11-1p1/shm.c --- cygipc-1.11-1.orig/shm.c 2001-02-10 18:50:01.000000000 -0500 +++ cygipc-1.11-1p1/shm.c 2002-11-05 09:25:37.000000000 -0500 @@ -262,8 +262,8 @@ int shmget (key_t key, int size, int shm debug_printf("shmget : key=3D%p size=3D%X shmflg=3D%X\n",key,size,shmflg);= =09 if (shm_connect() =3D=3D 0) { -debug_printf("shmget : return -EACCES\n"); - CYGWIN_IPCNT_RETURN (-EACCES) ; +debug_printf("shmget : return -ENOSYS\n"); + CYGWIN_IPCNT_RETURN (-ENOSYS) ; } =20 if (size < 0 ) --mojUlQ0s9EVzWg2t-- --eHhjakXzOLJAF9wJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (Cygwin32) iD8DBQE9x+YAGv3kzOz0jvYRAktgAJ9AVXHLlODevKx/5p8oMd+fMieUzQCeLN7m kbG2RQz2Wf8IYDxnokVw8EU= =vXTH -----END PGP SIGNATURE----- --eHhjakXzOLJAF9wJ--