diff options
author | gdt <gdt@pkgsrc.org> | 2022-06-19 22:22:21 +0000 |
---|---|---|
committer | gdt <gdt@pkgsrc.org> | 2022-06-19 22:22:21 +0000 |
commit | 578526abea0c2675186eceff550538fda77763fa (patch) | |
tree | d3273e3bf88acf27711b22bdae6f86e5b42a7720 /lang | |
parent | 7c53f6c3693e272d01329f1ef3d2594ff8608f37 (diff) | |
download | pkgsrc-578526abea0c2675186eceff550538fda77763fa.tar.gz |
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 (limited to 'lang')
-rw-r--r-- | lang/tcl-expect/Makefile | 4 | ||||
-rw-r--r-- | lang/tcl-expect/distinfo | 4 | ||||
-rw-r--r-- | lang/tcl-expect/patches/patch-exp__chan.c | 14 |
3 files changed, 14 insertions, 8 deletions
diff --git a/lang/tcl-expect/Makefile b/lang/tcl-expect/Makefile index da34a263ee3..cd5c060357d 100644 --- a/lang/tcl-expect/Makefile +++ b/lang/tcl-expect/Makefile @@ -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 diff --git a/lang/tcl-expect/distinfo b/lang/tcl-expect/distinfo index d553f176d8a..c6c588b956a 100644 --- a/lang/tcl-expect/distinfo +++ b/lang/tcl-expect/distinfo @@ -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 --git a/lang/tcl-expect/patches/patch-exp__chan.c b/lang/tcl-expect/patches/patch-exp__chan.c index f8b06d7244e..cfe14933f9f 100644 --- a/lang/tcl-expect/patches/patch-exp__chan.c +++ b/lang/tcl-expect/patches/patch-exp__chan.c @@ -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 @@ cause problems, we can wrap it in ifdefs. --- 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 @@ cause problems, we can wrap it in ifdefs. + *errorCodePtr = EBADF; + return -1; + } ++#endif + bytesRead = read(esPtr->fdin, buf, (size_t) toRead); /*printf("ExpInputProc: read(%d,,) = %d\r\n",esPtr->fdin,bytesRead);*/ |