bugGNU Octave - Bugs: bug #53364, starting octave backgrounded...

 
 

bug #53364: starting octave backgrounded (octave &) does not initialize terminal correctly

Submitter:  Mike Miller <mtmiller>
Submitted:  Fri 16 Mar 2018 07:29:53 PM UTC
   
 
Category:  Interpreter Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Other
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Mar 2018 06:37:52 PM UTC, comment #4: 

Same with irb. Ok, closing as won't fix since Octave behaves just like all other interactive interpreters.

Mike Miller <mtmiller>
Group Member
Mon 19 Mar 2018 04:55:54 PM UTC, comment #3: 

Also confirmed that Perl is not initialized correctly if launched in the background.


perl -de 42 &


The perl interpreter works, but since there is no echo one is programming blind.

Rik <rik5>
Group administrator
Sat 17 Mar 2018 10:38:32 PM UTC, comment #2: 

Thanks for showing that Python behaves the same way. Confirmed here, so I think it would be fine to document this as known behavior and not worry about it.

Mike Miller <mtmiller>
Group Member
Sat 17 Mar 2018 10:15:07 AM UTC, comment #1: 

That's a good test for the difference in terminal line settings.  They are obviously different for the background to foreground step.  I will point out, though, that even though the Octave command line terminal echo seems inactive, this isn't any different than what happens for python (where I've typed "exit()" in both scenarios:


linux@ ~/octave $ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
linux@ ~/octave $ python &
[1] 3132
linux@ ~/octave $ Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.


[1]+  Stopped                 python
linux@ ~/octave $ fg
python
>>> >>> >>> >>> >>> >>> >>> linux@ ~/octave $
linux@ ~/octave $
linux@ ~/octave $


Is there some type of command-line option for "fg" that will reinstate the terminal settings?  I can't find a man page for fg, or any command-line help dump.  Also, after having done the background-to-foreground step, the shell "reset" in the drop-down menu doesn't fix the problem.

Dan Sebald <sebald>
Fri 16 Mar 2018 07:29:53 PM UTC, original submission:  

When octave or octave-cli is started as a background job, and then brought to the foreground again, the terminal settings have not been initialized correctly, when compared with running in the foreground.


$ ./run-octave -q &
[1] 11616
$ fg
./run-octave -q
>> system stty;       ## typed, but there is no echo
speed 38400 baud; line = 0;
lnext = <undef>; min = 1; time = 0;
-brkint -icrnl -imaxbel iutf8
-icanon -echo
>> quit
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel iutf8


This behavior has existed since Octave 3.8.2. Octave 3.6.4 was able to start and initialize in the background correctly.

Starting Octave in the foreground and then backgrounding works fine.

Mike Miller <mtmiller>
Group Member

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by mtmiller (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-19 mtmiller StatusConfirmed Wont Fix
        Open/ClosedOpen Closed
    2018-03-19 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.14-f13d.
    Corresponding source code