Ticket #1404 (closed defect: fixed)

Opened 15 years ago

Last modified 15 years ago

Regression: Ctrl-C kills MC

Reported by: vda Owned by: andrew_b
Priority: major Milestone: 4.7.0-pre2
Component: mc-core Version: 4.6.2
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description (last modified by andrew_b) (diff)

In MC built from current-ish git, Ctrl-C causes it to exit. This wasn't happening in 4.6.1 - Ctrl-C was ignored.

Change History

comment:1 Changed 15 years ago by angel_il

i can't reproduce
C-c close mcedit but not mc

comment:2 Changed 15 years ago by slavazanko

Can't reproduce too.

CTRL+C and CTRL+G is a hotkeys for exit from editor/viewer. In panels these hotkeys don't works. Please, keep more info for reproduce your testCase.

comment:3 Changed 15 years ago by vda

It happens with mouse support disabled.

In other words: try Ctrl-C'ing MC which was started with "mc -d".

comment:4 Changed 15 years ago by angel_il

i run mc -d
and i can't close mc by Ctrl-C

comment:5 follow-ups: ↓ 6 ↓ 7 Changed 15 years ago by vda

I would be happy to retest it on today's git,
but it currently doesn't build, as I reported on the mailing list:

# ./autogen.sh && ./configure && make
...
...
view.o: In function `view_search_cmd':
/.1/usr/srcdevel/mc/fix/mc.t9/.obj/src/../../src/view.c:3328: undefined reference to `str_convert_to_input'
collect2: ld returned 1 exit status
make[3]: * [mc] Error 1
make[3]: Leaving directory `/.1/usr/srcdevel/mc/fix/mc.t9/.obj/src'
make[2]:
* [all-recursive] Error 1
make[2]: Leaving directory `/.1/usr/srcdevel/mc/fix/mc.t9/.obj/src'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/.1/usr/srcdevel/mc/fix/mc.t9/.obj'
make:
* [all] Error 2

On a few week old build, I definitely see that "normal" mc ignores Ctrl-C and "mc -d" dies on Ctrl-C. I see in strace that it simply gets SIGINT and apparently there is no handler installed:

gettimeofday({1247522706, 784591}, NULL) = 0
select(5, [4], NULL, NULL, NULL) = ? ERESTARTNOHAND (To be restarted)
--- SIGINT (Interrupt) @ 0 (0) ---
+++ killed by SIGINT +++

comment:6 in reply to: ↑ 5 Changed 15 years ago by angel_il

Replying to vda:

I would be happy to retest it on today's git,
but it currently doesn't build, as I reported on the mailing list:

# ./autogen.sh && ./configure && make

$ git pull
$ git checkout -b 1397_master_broken origin/1397_master_broken
$ ./autogen.sh && ./configure && make

this branch fix build error. try in 1397_master_broken CTRL-C

comment:7 in reply to: ↑ 5 Changed 15 years ago by slavazanko

Replying to vda:

I would be happy to retest it on today's git,
but it currently doesn't build, as I reported on the mailing list:

This bug now fixed: #1397. Sorry for the inconvenience.

comment:8 Changed 15 years ago by vda

Thanks Slava, current git builds again, and also I see that whitespace highligting is now configurable. Wow.

Regarding this bug. It happens on a build configured with
--without-subshell, like this:

./autogen.sh && ./configure --without-subshell && make

And also you need to run "mc -d". Then Ctrl-C kills mc.

comment:9 Changed 15 years ago by andrew_b

It seems this bug was introduced for a long time ago...

commit 66332a4fb1d3b9e7304a477eaa2dc8b5f9eb0e80
Author: Roland Illig <roland.illig@gmx.de>
Date:   Mon Aug 29 08:45:28 2005 +0000

        * slint.c: The handling of user interrupts has been moved to ...
        * tty.c: ... this newly created file, which contains a simple,
        not yet complete interface to the terminal library. It should be
        used instead of depending directly on ncurses or SLang features.
        * tty.h: Added the new function prototypes from tty.c and some
        legacy definitions.

comment:10 Changed 15 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b

Created branch 1404_ctrc_kills_mc. Parent branch: master.
changeset:3d4560bd5baca9b7ad3cc929ea803c2c2c88ab5b

This commit restores the SIGINT signal handling. But if mouse is disabled (mc runs with -d oprion), the Ctrl-C command is totally ignored.

comment:11 Changed 15 years ago by angel_il

  • Milestone changed from 4.7 to 4.7.0-pre2

comment:12 Changed 15 years ago by iNode

yes, C-c fixed, but it's not one shell binding, C-z still work here (Should it be?)

comment:13 Changed 15 years ago by styx

  • Votes for changeset set to styx
  • Description modified (diff)
  • severity changed from no branch to on review

ok, my vote is here, as ticket about C-c. if C-z will be here too

comment:14 Changed 15 years ago by andrew_b

  • Description modified (diff)

Restored description.

comment:15 Changed 15 years ago by angel_il

  • Votes for changeset changed from styx to styx angel_il
  • severity changed from on review to approved

comment:16 Changed 15 years ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed
  • severity changed from approved to merged

comment:17 Changed 15 years ago by andrew_b

  • Status changed from testing to closed
  • Votes for changeset changed from styx angel_il to commited-master
Note: See TracTickets for help on using tickets.