Ticket #3380 (closed defect: fixed)

Opened 9 years ago

Last modified 4 years ago

don't work subshell in mcedit (ubuntu 14.04.1 LTS)

Reported by: xfileslv Owned by: andrew_b
Priority: critical Milestone: 4.8.24
Component: mcedit Version: 4.8.13
Keywords: subshell Cc: egmont@…, info@…, onlyjob@…
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Hello.

root@ubuntu:~# mc -V
GNU Midnight Commander 4.8.13
Built with GLib 2.40.0
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

root@ubuntu:~# env
TERM=xterm
SHELL=/bin/bash
USER=root
.....

load program "mcedit" try "ctrl-o" and no subshell.

root@ubuntu:~# env
TERM=linux
SHELL=/bin/bash
USER=root
.....

load program "mcedit" try "ctrl-o" and see error :
Error : Not an xterm or Linux console; the panels cannot be toggled.

OS : Linux, Ubuntu Server 14.04.1 LTS
Note : command : mcview & mc - subshell is work correctly.

reproduce its possible, try install Ubuntu Sever 14.04.1 LTS to VMWARE and try use "mcedit"

if need i can capture to video.

Change History

comment:1 Changed 9 years ago by egmont

I assume you log in as a simple user, and for that user it works; but then you continue with sudo to switch to root and then it doesn't work for root - at least that's what happens to me. Could you please confirm?

comment:2 Changed 9 years ago by egmont

  • Cc egmont@… added

comment:3 Changed 9 years ago by murz

Confirm this problem on all my Ubuntu systems.

On mc - Ctrl+O starts shell normally.

But on mcedit and mcview - after pressing Ctrl+O I see only old shell output, but when try to type anything - I got back to mcedit interface.

This is reproducible with root user, witn normal user, also I already try to add normal user to tty group.

comment:4 Changed 9 years ago by murz

Here is strace of mcedit after pressing Ctrl-O:

select(5, [4], NULL, NULL, NULL) = 1 (in [4])
rt_sigaction(SIGINT, {SIG_IGN, [], SA_RESTORER, 0x7fefcb390c90}, NULL, 8) = 0
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
select(5, [4], NULL, NULL, {10, 0}) = 1 (in [4], left {9, 999998})
read(4, "\17", 1) = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{"&\0\2\0\236\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\7\0\0\0\0\0\236\0\0\0\353:0\2\310\5\372\3\310\5\372\3\4\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, 0x7fff905f98c0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, 0x7fff905f98c0, 0) = -1 EAGAIN (Resource temporarily unavailable)
write(1, "\33[?1006l\33[?1002l\33[?1001r", 24) = 24
write(1, "\33[?2004l", 8) = 8
write(1, "\33[A\33[39m\33[49m\33[K\n\33[K\n\33[K\n\33[K\n\33[K"..., 276) = 276
rt_sigprocmask(SIG_BLOCK, [INT QUIT TSTP TTIN TTOU WINCH], [], 8) = 0
write(1, "\33[?1l\33>\33[64;1H\33(B\33[m\33[39;49m\r\33[K"..., 41) = 41
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(1, "\33[?47l\0338\33[m", 11) = 11
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 -opost isig -icanon -echo ...}) = 0
ioctl(4, SNDCTL_TMR_START or SNDRV_TIMER_IOCTL_TREAD or TCSETS, {B38400 -opost isig -icanon -echo ...}) = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 -opost isig -icanon -echo ...}) = 0
select(5, [4], NULL, NULL, {10, 0}) = 0 (Timeout)
select(5, [4], NULL, NULL, {10, 0}) = 0 (Timeout)
select(5, [4], NULL, NULL, {10, 0}) = 0 (Timeout)
select(5, [4], NULL, NULL, {10, 0}

comment:5 Changed 9 years ago by vpanov

I have recently switched to debian. It has same problem. I also remember seeing this kind of stupidity in Ubuntu too. mcedit is configured as external editor there. If you enable internal editor in settings subshell will work fine (F9->0->c->use internal edit).

comment:6 Changed 5 years ago by metux

I about two decades of using mc, I don't recall that this ever worked like you intent.
IIRC, when mc is called as "mcedit", it doesn't start a subshell at all, so subshell can't work in that mode.

IMHO, this is not a bug, but a feature request.

--mtx

comment:7 Changed 5 years ago by metux

  • Cc info@… added

comment:8 Changed 4 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.24

comment:9 Changed 4 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:10 Changed 4 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:11 Changed 4 years ago by andrew_b

  • Status changed from testing to closed

comment:12 Changed 4 years ago by onlyjob

  • Cc onlyjob@… added
Note: See TracTickets for help on using tickets.