Bug 217758

Summary: misc/mc weird subshell behaviour after 4.8.15
Product: Ports & Packages Reporter: Dron <dron_2>
Component: Individual Port(s)Assignee: Ben Woods <woodsb02>
Status: In Progress ---    
Severity: Affects Only Me CC: danfe, moiseev
Priority: --- Flags: woodsb02: maintainer-feedback+
woodsb02: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://midnight-commander.org/ticket/2633
Attachments:
Description Flags
patch moiseev: maintainer-approval?

Description Dron 2017-03-13 14:49:55 UTC
Hello.
After 4.8.15 I have weird subshell behaviour. if I issue some command in mc and then press Ctrl+o, panels are hiding, but no output present (at local console). If I use putty, I have output, but need to scroll up.
Tested at 10.3 and 11.
This looks like this bug - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194627
I use default csh as shell.
Thanks.
Comment 1 Dron 2017-03-13 15:02:33 UTC
4.8.15 was latest release where behaviour was normal.
Comment 2 Dron 2017-04-04 13:51:40 UTC
Any news about this situation?
Comment 3 Alexander Moisseev 2017-06-23 07:49:03 UTC
Created attachment 183733 [details]
patch

Currently subshell works properly in putty with ncurses. The proposed patch fixes subshell in putty for Midnight Commander built with Slang.
Comment 4 Dron 2017-07-21 09:27:02 UTC
I checked patch and it works great in putty. Local console still have weird behaviour.
Thanks.

Any chance to get this in ports?
Comment 5 Alexey Dokuchaev freebsd_committer 2017-12-17 05:27:55 UTC
I also observe this regression, the latest version 4.8.20 included.  I believe it got broken with r414983 (r414982 behaves correctly).  This problem is apparently well known upstream: https://midnight-commander.org/ticket/2633 (opened six years ago).

Ben asked me to provide some details:

- Happens with any shell (tried sh, tcsh, bash)
- Default version (SLang): broken in both X11 and console, ncurses
  version: works in X11 but not on the console (TERM=xterm is all cases)
- As a non-privileged user
Comment 6 commit-hook freebsd_committer 2017-12-17 06:59:01 UTC
A commit references this bug:

Author: woodsb02
Date: Sun Dec 17 06:58:41 UTC 2017
New revision: 456522
URL: https://svnweb.freebsd.org/changeset/ports/456522

Log:
  misc/mc: Fix SUBSHELL blank terminal upon opening in xterm with Slang

  Note: Unfortunately this does not fix this issue on the FreeBSD console.

  PR:		217758
  Submitted by:	Alexander Moisseev <moiseev@mezonplus.ru>
  Reported by:	Dron <dron_2@ua.fm>
  Reported by:	danfe
  MFH:		2017Q4

Changes:
  head/misc/mc/Makefile
  head/misc/mc/files/patch-lib_tty_tty-slang.c
Comment 7 Ben Woods freebsd_committer 2017-12-17 07:03:22 UTC
Sorry for ignoring this for so long. I couldn't work out why sometimes I couldn't replicate it, and why other times this didn't fix it.

Indeed, this fixes the issue when using Slang in xterm.
The problem didn't exist with Ncurses in xterm.
The problem still exists with both Slang and Ncurses in native FreeBSD console.
Comment 8 commit-hook freebsd_committer 2017-12-18 10:47:53 UTC
A commit references this bug:

Author: woodsb02
Date: Mon Dec 18 10:47:45 UTC 2017
New revision: 456605
URL: https://svnweb.freebsd.org/changeset/ports/456605

Log:
  MFH: r456522

  misc/mc: Fix SUBSHELL blank terminal upon opening in xterm with Slang

  Note: Unfortunately this does not fix this issue on the FreeBSD console.

  PR:		217758
  Submitted by:	Alexander Moisseev <moiseev@mezonplus.ru>
  Reported by:	Dron <dron_2@ua.fm>
  Reported by:	danfe

  Approved by:	ports-secteam (delphij)

Changes:
_U  branches/2017Q4/
  branches/2017Q4/misc/mc/Makefile
  branches/2017Q4/misc/mc/files/patch-lib_tty_tty-slang.c