bugGNU Octave - Bugs: bug #55821, Ctrl+C not being passed to the...

 
 

bug #55821: Ctrl+C not being passed to the pager when 'less' is in "follow output" mode

Submitter:  Dan Sebald <sebald>
Submitted:  Sun 03 Mar 2019 06:38:04 PM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  3 - Low Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  Dan Sebald Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 03 Mar 2019 06:44:54 PM UTC, comment #1: 

I can confirm.

A weird workaround is to suspend Octave and resume it. After resuming, the 'less' pager will have returned to normal mode, and entering 'q' quits and returns to the Octave prompt.

This first appeared in Octave 4.4, probably due to the way that Octave handles signals including SIGINT now. The signal is blocked in the main thread so the pager never receives it.

Mike Miller <mtmiller>
Group Member
Sun 03 Mar 2019 06:38:04 PM UTC, original submission:  

Try the following:


octave:6> more on
octave:7> y = 1:1e7


and hit Ctrl+C somewhere when it is displaying:


 Columns 36 through 42:
-- less -- (f)orward, (b)ack, (q)uit


Octave is still in the pager.  The pager's "follow output" mode needs a Ctrl+C to exit, but Octave is not passing that escape sequence to the pager.  When in pager, type Shft+F, which means to keep moving (pressing) f indefinitely:


[snip]
 Columns 1259567 through 1259573:

    1259567    1259568    1259569    1259570    1259571    1259572    1259573

 Columns 1259574 through 1259580:

    1259574    1259575    1259576    1259577
Waiting for data... (interrupt to abort)


Cntrl-C doesn't work at this point.  (If there is a key sequence for abort, I don't know it.)  So, at this point octave is hung and only killing the process will exit.

Repeat the above sequence without pressing Ctrl+C (use y=1:1e6 if you like), and Ctrl+C still works in the pager after having pressed Shft+F.

Maybe leaving the pager altogether when pressing Ctrl+C during output is the way to go.

Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-05 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
    2019-03-03 mtmiller CategoryNone Interpreter
        Item GroupOther Unexpected Error or Warning
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code