Add a patch to avoid consuming 100% CPU in hold mode Without this patch, this happens every time the child exits. To reproduce, simply run "xterm -hold -e true". Submitted upstream on March 29th 2016. Bumps PKGREVISION.diff -r1.108 -r1.109 pkgsrc/x11/xterm/Makefile
(khorben)
@@ -1,16 +1,17 @@ | @@ -1,16 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.108 2016/04/24 10:37:39 wiz Exp $ | 1 | # $NetBSD: Makefile,v 1.109 2016/05/26 14:57:24 khorben Exp $ | |
2 | 2 | |||
3 | DISTNAME= xterm-324 | 3 | DISTNAME= xterm-324 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= x11 | 5 | CATEGORIES= x11 | |
5 | MASTER_SITES= ftp://invisible-island.net/xterm/ | 6 | MASTER_SITES= ftp://invisible-island.net/xterm/ | |
6 | EXTRACT_SUFX= .tgz | 7 | EXTRACT_SUFX= .tgz | |
7 | 8 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://dickey.his.com/xterm/xterm.html | 10 | HOMEPAGE= http://dickey.his.com/xterm/xterm.html | |
10 | COMMENT= Latest terminal emulator for the X Window System | 11 | COMMENT= Latest terminal emulator for the X Window System | |
11 | LICENSE= x11 | 12 | LICENSE= x11 | |
12 | 13 | |||
13 | GNU_CONFIGURE= yes | 14 | GNU_CONFIGURE= yes | |
14 | USE_TOOLS+= tbl pkg-config | 15 | USE_TOOLS+= tbl pkg-config | |
15 | 16 | |||
16 | WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} | 17 | WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} |
@@ -1,6 +1,7 @@ | @@ -1,6 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.75 2016/04/08 14:43:25 wiz Exp $ | 1 | $NetBSD: distinfo,v 1.76 2016/05/26 14:57:24 khorben Exp $ | |
2 | 2 | |||
3 | SHA1 (xterm-324.tgz) = eb12025627f5d9aeedaf252e7fc5dd9c30fee0d6 | 3 | SHA1 (xterm-324.tgz) = eb12025627f5d9aeedaf252e7fc5dd9c30fee0d6 | |
4 | RMD160 (xterm-324.tgz) = 4c7c3446830b183327b969dbc982e3ee2e56e160 | 4 | RMD160 (xterm-324.tgz) = 4c7c3446830b183327b969dbc982e3ee2e56e160 | |
5 | SHA512 (xterm-324.tgz) = f6f2518a11eec6e41afb10ca4ec298c566b1fc5c3b3c4c4d533311b3f64ec04c2bc692798e75bbd34382cb64eca9b21ee4b05438c4d18486046d3c710c586626 | 5 | SHA512 (xterm-324.tgz) = f6f2518a11eec6e41afb10ca4ec298c566b1fc5c3b3c4c4d533311b3f64ec04c2bc692798e75bbd34382cb64eca9b21ee4b05438c4d18486046d3c710c586626 | |
6 | Size (xterm-324.tgz) = 1235312 bytes | 6 | Size (xterm-324.tgz) = 1235312 bytes | |
7 | SHA1 (patch-main.c) = da2b1560c3d8011f6f06e18c37f496566c827c91 |
$NetBSD: patch-main.c,v 1.1 2016/05/26 14:57:24 khorben Exp $
Avoid consuming 100% CPU in hold mode when the child exits.
--- main.c.orig 2016-03-11 00:31:37.000000000 +0000
+++ main.c
@@ -5213,8 +5213,7 @@ reapchild(int n GCC_UNUSED)
do {
if (pid == TScreenOf(term)->pid) {
DEBUG_MSG("Exiting\n");
- if (!hold_screen)
- need_cleanup = True;
+ need_cleanup = True;
}
} while ((pid = nonblocking_wait()) > 0);