Skip to content

Slow startup on macOS with bash and intr=^G #4781

@egmontkob

Description

@egmontkob

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

GNU Midnight Commander 4.8.33-353-gc57edfe67
Built with GLib 2.80.4 (using GLib 2.80.4)
Built with NCurses 5.7.20081102 (using ncurses 5.7.20081102)
Built with libssh2 1.11.0
With builtin editor
With subshell support as default
With support for background operations
With mouse support on xterm
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, shell
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64; uintmax_t: 64;

Operating system

Darwin Kernel Version 21.6.0 [...] root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

  • macOS
  • bash 3.2 as shell
  • stty intr ^G

Start up mc, observe delay.

Expected behavior

No delay.

Actual behavior

About 10 seconds of delay.

Additional context

Issue is present both without and with the patches from #4625.

Cannot reproduce on Linux. Cannot reproduce with the default stty intr ^C. Cannot reproduce with zsh if the patches from 4625 are applied.

On macOS, killing mc (which I had to do a lot while debugging 4625 / 4780) leaves the terminal in a dirty state, including the interrupt character being ^G.

The command reset (on both platforms) leaves the interrupt character unchanged. On macOS it prints "Interrupt is control-G (^G)" but this might be somewhat misleading: it did not set this value newly, it just observed and warned about this unusual nondefault value.

Two questions:

  • Why does mc leave the terminal with this setting? Is it an mc bug or weird circumstance that we should fix?
  • Why does mc have a startup delay with this setting?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ttyInteraction with the terminal, screen librariesprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions