Merge lp:~niclasl/pantheon-terminal/fix-zsh-hang into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by Niclas Lockner
Status: Merged
Approved by: Raphael Isemann
Approved revision: 599
Merged at revision: 599
Proposed branch: lp:~niclasl/pantheon-terminal/fix-zsh-hang
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 18 lines (+2/-1)
1 file modified
src/TerminalWidget.vala (+2/-1)
To merge this branch: bzr merge lp:~niclasl/pantheon-terminal/fix-zsh-hang
Reviewer Review Type Date Requested Status
Raphael Isemann (community) functionality, code-style Approve
Review via email: mp+230027@code.launchpad.net

Commit message

Also send SIGHUP because zsh is ignoring SIGTERM.

Description of the change

Change signal to SIGHUP when terminating shell processes. ZSH ignores SIGTERM when it's running in an interactive session.

To post a comment you must log in.
Revision history for this message
Raphael Isemann (teemperor) wrote :

We should change it to send both SIGTERM and SIGHUP.

review: Needs Fixing
599. By Niclas Lockner

Use SIGTERM as well as SUGHUP

Revision history for this message
Raphael Isemann (teemperor) wrote :

Fixes the problem and sending two signals seems fine to me.

review: Approve (functionality, code-style)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/TerminalWidget.vala'
--- src/TerminalWidget.vala 2014-08-07 14:01:14 +0000
+++ src/TerminalWidget.vala 2014-08-08 07:12:09 +0000
@@ -245,6 +245,7 @@
245245
246 /* Check if the shell process is still alive by sending 0 signals */246 /* Check if the shell process is still alive by sending 0 signals */
247 while (Posix.kill (this.child_pid, 0) == 0) {247 while (Posix.kill (this.child_pid, 0) == 0) {
248 Posix.kill (this.child_pid, Posix.SIGHUP);
248 Posix.kill (this.child_pid, Posix.SIGTERM);249 Posix.kill (this.child_pid, Posix.SIGTERM);
249 Thread.usleep (100);250 Thread.usleep (100);
250 }251 }
@@ -421,4 +422,4 @@
421 }422 }
422 }423 }
423 }424 }
424}425}
425\ No newline at end of file426\ No newline at end of file

Subscribers

People subscribed via source and target branches