mc 4.6.0 subshell fix for FreeBSD 5.x
Nerijus Baliunas
nerijus at users.sourceforge.net
Tue Aug 5 15:26:42 UTC 2003
On Tue, 5 Aug 2003 16:59:56 +0300 (EEST) Nerijus Baliunas <nerijus at users.sourceforge.net> wrote:
> > Yes my patch works with FreeBSD 4.x.
> > FreeBSD 4.x does not have grantpt(3) so BSD version of
> > pty_open_master is compiled in from subshell.c.
>
> BTW, I've just compiled mc cvs on FreeBSD 4.5, and subshell does not work -
> I can see output of commands by pressing Ctrl-O, but I cannot enter commands.
> Should it be so?
IMHO BSD version of pty_open_master is flawed - for (ptr2) loop always
returns, so for (ptr1) loop only runs the first time, no?
And I suggest applying the following patch:
--- ../../mc/src/subshell.c Tue Jul 22 02:33:34 2003
+++ subshell.c Tue Aug 5 17:58:11 2003
@@ -1106,7 +1106,7 @@
for (ptr1 = "pqrstuvwxyzPQRST"; *ptr1; ++ptr1)
{
pty_name [8] = *ptr1;
- for (ptr2 = "0123456789abcdef"; *ptr2; ++ptr2)
+ for (ptr2 = "0123456789abcdefghijklmnopqrstuv"; *ptr2; ++ptr2)
{
pty_name [9] = *ptr2;
as /dev/ptyp0 to /dev/ptypv exist on my FreeBSD 4.5 system.
Regards,
Nerijus
More information about the mc-devel
mailing list