[Bugs] #2755 Terminal UNSP: Terminal should warn if applications open before exit

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Oct 4 02:23:52 EDT 2016


#2755: Terminal should warn if applications open before exit
----------------------------------------+-------------------------------
  Reporter:  greenfeld                  |            Owner:  sayamindu
      Type:  defect                     |           Status:  closed
  Priority:  Unspecified by Maintainer  |        Milestone:  Unspecified
 Component:  Terminal                   |          Version:  0.92.x
  Severity:  Trivial                    |       Resolution:  wontfix
  Keywords:                             |  Distribution/OS:  OLPC
Bug Status:  Unconfirmed                |
----------------------------------------+-------------------------------
Changes (by quozl):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 When the shell is created, the PID is recorded by Terminal, in `box.pid`,
 as part of `_create_tab`.

 Terminal may be changed to count all processes with a parent PID equal to
 the shell PID, and invoke the keep warning if non-zero.

 Further refinement may be to check each child process to see if it still
 has any file descriptors open for the Vte pseudo-terminal in /dev/pts; so
 that forked background processes do not force a keep warning.

 Or, via `pkexec` and `lsof` count the number of processes that have the
 corresponding /dev/pts open.

 Unfortunately, there's still a corner case; it is not practical to
 determine if the shell is at a script prompt if the script was activated
 with `source`.  So an alternate solution is to require ctrl+d or `exit` to
 quit the shell, and block the stop button if the shell process still
 exists.

 As a consequence, there will never be anything to be saved, and so the
 saving to journal of tab text, theme, and font size can be removed, the
 journal object could be avoided all together, and Terminal would be much
 smaller.  Yay!

 Let the ticket be re-opened when anybody thinks they'd like to have a go
 at this!

--
Ticket URL: <https://bugs.sugarlabs.org/ticket/2755#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list