pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/mc



Module Name:    pkgsrc
Committed By:   joerg
Date:           Fri Dec 16 00:02:28 UTC 2016

Modified Files:
        pkgsrc/sysutils/mc: Makefile distinfo
Added Files:
        pkgsrc/sysutils/mc/patches: patch-src_subshell_common.c

Log Message:
Report correct errno value. Recognize and handle plain Bourne shell.
Bump revision.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 pkgsrc/sysutils/mc/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/sysutils/mc/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/mc/patches/patch-src_subshell_common.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/mc/Makefile
diff -u pkgsrc/sysutils/mc/Makefile:1.105 pkgsrc/sysutils/mc/Makefile:1.106
--- pkgsrc/sysutils/mc/Makefile:1.105   Wed Oct 19 13:33:25 2016
+++ pkgsrc/sysutils/mc/Makefile Fri Dec 16 00:02:28 2016
@@ -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

Index: pkgsrc/sysutils/mc/distinfo
diff -u pkgsrc/sysutils/mc/distinfo:1.28 pkgsrc/sysutils/mc/distinfo:1.29
--- pkgsrc/sysutils/mc/distinfo:1.28    Wed Oct 19 13:33:25 2016
+++ pkgsrc/sysutils/mc/distinfo Fri Dec 16 00:02:28 2016
@@ -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 @@ SHA512 (mc-4.8.18.tar.bz2) = ed19d91fbf3
 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

Added files:

Index: pkgsrc/sysutils/mc/patches/patch-src_subshell_common.c
diff -u /dev/null pkgsrc/sysutils/mc/patches/patch-src_subshell_common.c:1.1
--- /dev/null   Fri Dec 16 00:02:28 2016
+++ pkgsrc/sysutils/mc/patches/patch-src_subshell_common.c      Fri Dec 16 00:02:28 2016
@@ -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