pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/mc Report correct errno value. Recognize and ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/525f2fed62be
branches: trunk
changeset: 355940:525f2fed62be
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Dec 16 00:02:28 2016 +0000
description:
Report correct errno value. Recognize and handle plain Bourne shell.
Bump revision.
diffstat:
sysutils/mc/Makefile | 3 +-
sysutils/mc/distinfo | 3 +-
sysutils/mc/patches/patch-src_subshell_common.c | 44 +++++++++++++++++++++++++
3 files changed, 48 insertions(+), 2 deletions(-)
diffs (75 lines):
diff -r 11e2fecdd23e -r 525f2fed62be sysutils/mc/Makefile
--- a/sysutils/mc/Makefile Fri Dec 16 00:01:53 2016 +0000
+++ b/sysutils/mc/Makefile Fri Dec 16 00:02:28 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.105 2016/10/19 13:33:25 wiz Exp $
+# $NetBSD: Makefile,v 1.106 2016/12/16 00:02:28 joerg Exp $
DISTNAME= mc-4.8.18
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.midnight-commander.org/downloads/
EXTRACT_SUFX= .tar.bz2
diff -r 11e2fecdd23e -r 525f2fed62be sysutils/mc/distinfo
--- a/sysutils/mc/distinfo Fri Dec 16 00:01:53 2016 +0000
+++ b/sysutils/mc/distinfo Fri Dec 16 00:02:28 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2016/10/19 13:33:25 wiz Exp $
+$NetBSD: distinfo,v 1.29 2016/12/16 00:02:28 joerg Exp $
SHA1 (mc-4.8.18.tar.bz2) = 7dc7839e06eb857122a7919098e80af466cd8c49
RMD160 (mc-4.8.18.tar.bz2) = 2c82ea7946448dd765707441358d9b4a9646a6f0
@@ -6,4 +6,5 @@
Size (mc-4.8.18.tar.bz2) = 3336440 bytes
SHA1 (patch-ac) = d01357b685acd8e863510248ed7519ae2821757f
SHA1 (patch-ad) = 4484b91511cf5bac73f4ae940988d46239e2cd95
+SHA1 (patch-src_subshell_common.c) = 6fc3a92e6116527f7ead9d9515906add0b30ff5e
SHA1 (patch-src_vfs_extfs_helpers_Makefile.in) = c5d4735ce9548714731fdb1227e1acac78f11332
diff -r 11e2fecdd23e -r 525f2fed62be sysutils/mc/patches/patch-src_subshell_common.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/mc/patches/patch-src_subshell_common.c Fri Dec 16 00:02:28 2016 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_subshell_common.c,v 1.1 2016/12/16 00:02:28 joerg Exp $
+
+Report error from read since tcsetattr can replace errno.
+Recognize /bin/sh as valid shell and don't complain about it.
+
+--- src/subshell/common.c.orig 2016-09-22 18:24:12.000000000 +0000
++++ src/subshell/common.c
+@@ -303,6 +303,7 @@ init_subshell_child (const char *pty_nam
+
+ case SHELL_ASH_BUSYBOX:
+ case SHELL_DASH:
++ case SHELL_SH:
+ /* Do we have a custom init file ~/.local/share/mc/ashrc? */
+ init_file = mc_config_get_full_path ("ashrc");
+
+@@ -496,7 +497,7 @@ static gboolean
+ feed_subshell (int how, gboolean fail_on_error)
+ {
+ fd_set read_set; /* For 'select' */
+- int bytes; /* For the return value from 'read' */
++ int serrno, bytes; /* For the return value from 'read' */
+ int i; /* Loop counter */
+
+ struct timeval wtime; /* Maximum time we wait for the subshell */
+@@ -551,15 +552,16 @@ feed_subshell (int how, gboolean fail_on
+ /* for (i=0; i<5; ++i) * FIXME -- experimental */
+ {
+ bytes = read (mc_global.tty.subshell_pty, pty_buffer, sizeof (pty_buffer));
++ serrno = errno;
+
+ /* The subshell has died */
+- if (bytes == -1 && errno == EIO && !subshell_alive)
++ if (((bytes == -1 && errno == EIO) || bytes == 0) && !subshell_alive)
+ return FALSE;
+
+- if (bytes <= 0)
++ if (bytes < 0)
+ {
+ tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
+- fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (errno));
++ fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (serrno));
+ exit (EXIT_FAILURE);
+ }
+
Home |
Main Index |
Thread Index |
Old Index