pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/tcl-expect lang/tcl-expect: Limit deadlock workar...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3141bf81d150
branches:  trunk
changeset: 380945:3141bf81d150
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sun Jun 19 22:22:21 2022 +0000

description:
lang/tcl-expect: Limit deadlock workaround to affected platforms

This caused a build failure on OpenServer.  As the comment hinted
would be necessary, limit the workaround to linux and sunos, which are
known to have poll.  (expect does not have a configure test for poll
already.)

diffstat:

 lang/tcl-expect/Makefile                  |   4 ++--
 lang/tcl-expect/distinfo                  |   4 ++--
 lang/tcl-expect/patches/patch-exp__chan.c |  14 ++++++++++----
 3 files changed, 14 insertions(+), 8 deletions(-)

diffs (82 lines):

diff -r 079f4dfda703 -r 3141bf81d150 lang/tcl-expect/Makefile
--- a/lang/tcl-expect/Makefile  Sun Jun 19 21:37:15 2022 +0000
+++ b/lang/tcl-expect/Makefile  Sun Jun 19 22:22:21 2022 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.35 2022/05/15 01:56:24 dholland Exp $
+# $NetBSD: Makefile,v 1.36 2022/06/19 22:22:21 gdt Exp $
 
 .include "Makefile.common"
 
 PKGNAME=       tcl-expect-${EXPECT_VERSION}
-PKGREVISION=   5
+PKGREVISION=   6
 CATEGORIES=    lang
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
diff -r 079f4dfda703 -r 3141bf81d150 lang/tcl-expect/distinfo
--- a/lang/tcl-expect/distinfo  Sun Jun 19 21:37:15 2022 +0000
+++ b/lang/tcl-expect/distinfo  Sun Jun 19 22:22:21 2022 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.25 2022/06/19 14:43:28 gdt Exp $
+$NetBSD: distinfo,v 1.26 2022/06/19 22:22:21 gdt Exp $
 
 BLAKE2s (expect5.45.tar.gz) = 38c440ed0868322b6ec7438decaa036a636e7d700191b754c1e4a7dc0fdd0c46
 SHA512 (expect5.45.tar.gz) = be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51
 Size (expect5.45.tar.gz) = 628808 bytes
 SHA1 (patch-Makefile.in) = 06858e50b7517901d0a7dc58f2149e7ef09b615b
 SHA1 (patch-configure) = 51ae6c4aaf6ff1ac510aec0d062310a91cb959c2
-SHA1 (patch-exp__chan.c) = 045d3442cfdc0976c8767a6cbdd9bbf2dcc8ed87
+SHA1 (patch-exp__chan.c) = 20fa6d6902f0a60c6f9767de60178ad8860a2229
diff -r 079f4dfda703 -r 3141bf81d150 lang/tcl-expect/patches/patch-exp__chan.c
--- a/lang/tcl-expect/patches/patch-exp__chan.c Sun Jun 19 21:37:15 2022 +0000
+++ b/lang/tcl-expect/patches/patch-exp__chan.c Sun Jun 19 22:22:21 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-exp__chan.c,v 1.2 2022/06/19 14:43:28 gdt Exp $
+$NetBSD: patch-exp__chan.c,v 1.3 2022/06/19 22:22:22 gdt Exp $
 
 Add hack to work around deadlock situation that occurs on Solaris and
 Linux. See PR 34442.
@@ -13,27 +13,32 @@
 
 --- exp_chan.c.orig    2010-07-01 00:53:49.000000000 +0000
 +++ exp_chan.c
-@@ -7,6 +7,7 @@
+@@ -7,6 +7,9 @@
   */
  
  #include <sys/types.h>
++#if defined(linux) || defined(sunos)
 +#include <sys/poll.h>
++#endif
  #include <stdio.h>
  #include <signal.h>
  #include <errno.h>
-@@ -205,6 +206,8 @@ ExpInputProc(instanceData, buf, toRead, 
+@@ -205,6 +208,10 @@ ExpInputProc(instanceData, buf, toRead, 
      ExpState *esPtr = (ExpState *) instanceData;
      int bytesRead;                    /* How many bytes were actually
                                           * read from the input device? */
++#if defined(linux) || defined(sunos)
 +    struct pollfd fds[1];
 +    int pollResult;
++#endif
  
      *errorCodePtr = 0;
      
-@@ -215,6 +218,18 @@ ExpInputProc(instanceData, buf, toRead, 
+@@ -215,6 +222,20 @@ ExpInputProc(instanceData, buf, toRead, 
       * nonblocking, the read will never block.
       */
  
++#if defined(linux) || defined(sunos)
 +    /* Update: there isn't always, which can lead to hangs. See PR 34442. */
 +    fds[0].fd = esPtr->fdin;
 +    fds[0].events = POLLIN | POLLERR | POLLHUP | POLLNVAL;
@@ -45,6 +50,7 @@
 +        *errorCodePtr = EBADF;
 +      return -1;
 +    }
++#endif
 +
      bytesRead = read(esPtr->fdin, buf, (size_t) toRead);
      /*printf("ExpInputProc: read(%d,,) = %d\r\n",esPtr->fdin,bytesRead);*/



Home | Main Index | Thread Index | Old Index