Pressing ^C at prompt breaks subsequent signal handling

Bug #1830378 reported by Rickard Westman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apcalc (Ubuntu)
New
Undecided
Unassigned

Bug Description

I sometimes press Ctrl-C at interactive prompts when I don't want to go through with the command I've begun to type. This works in most shells and interactive programs using readline. In calc, it works once, but only once. Afterwards, it's also impossible to use of Ctrl-C to abort computations. Aborting a computation with Ctrl-C does not *trigger* the problem, however - only Ctrl-C pressed at the interactive prompt does.

Example session:

  C-style arbitrary precision calculator (version 2.12.5.0)
  Calc is open software. For license details type: help copyright
  [Type "exit" to exit, or "help" for help.]

  ; sleep(10)
  ^C
  [Abort level 1]
          9
  ; sleep(10)
  ^C
  [Abort level 1]
          9
  ; ^C
  ABORT

  ; sleep(10)
  ^C^C^C

What I did in the above:

1) Invoked sleep(10) and aborted it successfully by pressing Ctrl-C.
2) Repeated step 1, demonstrating that Ctrl-C didn't trigger the problem in this case.
3) Pressed Ctrl-C at the interactive prompt, successfully aborting, giving me a new command line.
4) Pressed Ctrl-C at the interactive prompt again. Nothing happens!
5) Invoked sleep(10) again, tried to abort with Ctrl-C, unsuccessfully.

Output from "lsb_release -rd":

  Description: Ubuntu 18.04.2 LTS
  Release: 18.04

Output from "ap-cache policy apcalc":

  apcalc:
    Installed: 2.12.5.0-1build1
    Candidate: 2.12.5.0-1build1
    Version table:
   *** 2.12.5.0-1build1 500
          500 http://se.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
          100 /var/lib/dpkg/status

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.