closing terminator windows doesn't close the processes within them

Bug #308025 reported by Martin Pool
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Terminator
Fix Released
High
Chris Jones

Bug Description

 affects terminator

I have a Terminator window and pressed Ctrl+Shift+W to close some tabs.
I can see that the processes within them are still running:

init-+-/usr/bin/termin-+-gnome-pty-helpe
     | |-xdg-open
     | |-zsh---vim---{vim}
     | |-4*[zsh]
     | |-zsh-+-less
     | | `-pstree
     | `-{/usr/bin/termin}

I would have expected they'd get a SIGHUP and that would kill them. At
any rate they are no longer accessible in any way. If I send a SIGHUP
to the zsh parent process of vim, it does exit and the vim process goes
away with it.

--
Martin <http://launchpad.net/~mbp>

Related branches

Revision history for this message
Thomas Hurst (tom.hurst) wrote :

Confirmed; manually closing a tab doesn't send children a SIGHUP. I've pushed a reasonable looking fix to trunk.

Changed in terminator:
assignee: nobody → tom.hurst
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Thomas Hurst (tom.hurst) wrote :

It looks like this might send duplicate HUPs when you close a window :/

Revision history for this message
Chris Jones (cmsj) wrote :

Thomas: Needing to manually SIGHUP means we are misbehaving elsewhere, unfortunately.

I've been doing some work on trunk which should prevent us leaving (python and gtk) references to the vte.Terminal objects and thus never GCing them.

poolie: could you branch lp:terminator and confirm?

(stealing the bug and marking In Progress pending confirmations. It seems ok to me, but it's late and there are lots of codepaths at work)

Changed in terminator:
assignee: tom.hurst → cmsj
status: Fix Committed → In Progress
Chris Jones (cmsj)
Changed in terminator:
milestone: none → 0.12
Revision history for this message
Chris Jones (cmsj) wrote :

0.12 is out and should fix this, please re-open if it doesn't.

Changed in terminator:
status: In Progress → Fix Released
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I'm seeing this behavior in 0.14.

Changed in terminator:
status: Fix Released → New
Revision history for this message
Chris Jones (cmsj) wrote :

I think this is now fixed in trunk. I have made Terminal::close() specifically send SIGHUP to its forked child. I don't really think it's advisable to try any harder to kill the process.

Changed in terminator:
status: New → Fix Committed
Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
Revision history for this message
Cleanrock (cleanrock) wrote :

This problem still exist in 0.93.
How to reproduce:
Start terminator and do a few splits, then close all windows except one using right mouse button menu => you will see that multiple shell (bash) child processes still exist.

Thomas Dziedzic (gostrc)
Changed in terminator:
status: Fix Released → Confirmed
Revision history for this message
Chris Jones (cmsj) wrote :

I've just pushed revision 1052 to trunk which explicitly closes each terminal when closing a window, which should fix this.

Changed in terminator:
status: Confirmed → Fix Committed
Chris Jones (cmsj)
Changed in terminator:
status: Fix Committed → Fix Released
Revision history for this message
Cleanrock (cleanrock) wrote :

This is not fixed in 0.94.
Do a few splits and close some windows using mouse, you will see that their are still extra shells running.

Thomas Dziedzic (gostrc)
Changed in terminator:
status: Fix Released → Confirmed
Revision history for this message
Steven Vancoillie (steabert) wrote :

In terminator version 0.95, this issue still exists.

Having a look at the python code of terminator, it seems that when one right-clicks and chooses menu-close, the terminal is only deregistered by calling the method deregister_terminal from the terminator class. Adding the line "terminal.close()" before it is removed from the terminals list (at "self.terminals.remove(terminal)") seems to solve the problem for me.

Revision history for this message
Chris Jones (cmsj) wrote :

Steven: Thanks for tracking that down, you're right - in the specific case of the context menu, it would not cause children to exit properly. I have updated that codepath to call close() on the Terminal object, so as of r1234 in trunk this should be fixed. It will be in 0.96.

Changed in terminator:
status: Confirmed → Fix Committed
Changed in terminator:
status: Fix Committed → Fix Released
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.