Ticket #3658 (closed defect: duplicate)

Opened 3 years ago

Last modified 20 months ago

Subshell not working with Bourne shell /bin/sh (not bash)

Reported by: woodsb02 Owned by:
Priority: major Milestone:
Component: mc-core Version: master
Keywords: Cc:
Blocked By: #3692 Blocking:
Branch state: no branch Votes for changeset:

Description

The subshell is not working with the Bourne shell /bin/sh, specifically in my case on FreeBSD. Note this is different to BASH.

When mc has been compiled with subshell support, and started in the Bourne shell, it fails to start with the following error message

common.c: unimplemented subshell type 1
read (subshell_pty...): No error: 0 (0)

Note that this error message occurs when mc starts - not afterwards when trying to view the subshell with ctrl+o.

The FreeBSD bug for this is PR 208391

Attachments

patch-src_subshell_common.c (948 bytes) - added by woodsb02 3 years ago.
Attempt at patch to fix subshell with Bourne shell /bin/sh (not work)

Change History

Changed 3 years ago by woodsb02

Attempt at patch to fix subshell with Bourne shell /bin/sh (not work)

comment:1 Changed 3 years ago by woodsb02

The attached patch allows mc to start without error. However, there is a 5 second delay when it starts. When trying to use the subshell, it simply shows a blank terminal, at which point any key press returns you to the normal mc file layout screen.

comment:2 Changed 3 years ago by and

Confirm on Solaris Bourne shell.

But subshell will never work on sh because precmd() comparable feature (for signaling current PWD back to mc) is missing.

comment:3 Changed 2 years ago by andrew_b

Ticket #3689 has been marked as a duplicate of this ticket.

comment:4 Changed 2 years ago by andrew_b

  • Blocked By 3692 added

comment:5 Changed 2 years ago by sierkb

Confirm on macOS 10.12.0 (Sierra).
See also MacPorts ticket #52511 – mc: subshell not working with /bin/sh incl. comments.

Please fix and release. And please target for next possible release or bug fix release instead for any undefined future release, so that patches relating this issue can take effect as soon as possible on the user's side.

comment:6 follow-up: ↓ 7 Changed 2 years ago by zaytsev

Fix and release what? Do you know of a way to support Bourne shell? Otherwise, if you want to use Bourne shell, you have to start mc without subshell. I can't see what can be done here...

comment:7 in reply to: ↑ 6 Changed 2 years ago by willbproggin

Replying to zaytsev:

Fix and release what? Do you know of a way to support Bourne shell? Otherwise, if you want to use Bourne shell, you have to start mc without subshell. I can't see what can be done here...

This affects me on FreeBSD as well. Can mc be fixed to just start internally without subshell support if it can't support a shell instead of failing ungracefully?

comment:8 Changed 20 months ago by andrew_b

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #373.

Note: See TracTickets for help on using tickets.