Bug 1036241 - Mate terminal emulator blocks SIGINT and SIGHUP signals
Summary: Mate terminal emulator blocks SIGINT and SIGHUP signals
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: mate-terminal
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dan Mashal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-29 23:45 UTC by Alexander Murashkin
Modified: 2013-12-29 09:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-29 09:01:28 UTC
Type: Bug


Attachments (Terms of Use)
program that can be used to display blocked signals or wait for signals (1.88 KB, text/x-c++src)
2013-11-29 23:45 UTC, Alexander Murashkin
no flags Details

Description Alexander Murashkin 2013-11-29 23:45:02 UTC
Created attachment 830787 [details]
program that can be used to display blocked signals or wait for signals

Description of problem:

It seems that mate-terminal when launched by mate-panel has sigprocmask that blocks SIGINT and SIGHUP signals. As a side effect ^C does not work.

Version-Release number of selected component (if applicable):

mate-terminal-1.6.1-11.fc19.x86_64
mate-panel-1.6.1-4.fc19.x86_64
mate-session-manager-1.6.1-4.fc19.x86_64
kdm-4.11.3-1.fc19.x86_64

How reproducible:

Steps to Reproduce:

1. Compile the attached program signal_catcher

g++ signal_catcher.cc -o signal_catcher

2. Launch mate-terminal via mate-panel (by default, MATE panel has terminal launcher).

3. In the mate-terminal run 

signal_catcher -l
try to press ^C in shell

Actual results:

inherited sigprocmask  1 2
^C is ignored

Expected results:

inherited sigprocmask  5 12 13 14 15 23 26
or
inherited sigprocmask empty
or
anything that does not include SIGHUP (1) and SIGINT (2)
^C shall interrupt

Additional info:

Here is the list of processes

root      1133     1  0 11:46 ?        00:00:00 /usr/bin/kdm vt1
root     10919  1133  0 14:57 tty1     00:00:19 /usr/bin/X :0 vt1 -background none -nolisten tcp -seat seat0 -auth /var/run/kdm/A:0-1YlnJa
root     10923  1133  0 14:57 ?        00:00:00 -:0             
mur      10942 10923  0 14:57 ?        00:00:00 mate-session
mur      11179 10942  0 14:57 ?        00:00:03 mate-panel
mur      11606 11179  0 14:58 ?        00:00:01 mate-terminal
mur      13744 11606  0 14:58 pts/7    00:00:00 bash
mur      14632 13744  0 14:59 pts/7    00:00:00 ./signal_catcher 

Note that bash process can be ignored. I configured mate-terminal profile that executes signal_catcher directly and the results are the same (blocking SIGINT and SIGHUP). 

Unfortunately, gdb info signals is not useful as it does not show sigprocmask.

PS signal_catcher has also few more options 
-l just print sigprocmask
-w sleep (so it is possible to test signals)
-u unblock SIGINT, SIGHUP, and SIGUSR1
-i install SIGINT, SIGHUP, and SIGUSR1 handlers (that print the signals)

For example, to test whether SIGINT actually works run
signal_catcher -w -i (it will print own pid)
and do kill -INT pid

Comment 1 Alexander Murashkin 2013-11-29 23:50:51 UTC
As a workaround 
- launch another terminal emulator, for example, Konsole
- be sure to kill mate-terminal
- run mate-terminal from the emulator started previously
- bingo! ^C works

Comment 2 Wolfgang Ulbrich 2013-11-30 13:24:11 UTC
Thank you for reporting the issue, but i can't reproduce the issue in f18/19/20.
Executing './signal_catcher -l' in a mate-terminal open from the panel gives me:
[rave@mother Downloads]$ ./signal_catcher -l
inherited sigprocmask  empty

Another mate dev from gentoo has same results like me.
Do you use normal fedora release?

Comment 3 Alexander Murashkin 2013-11-30 18:29:07 UTC
I am using normal Fedora 19 release. But my display manager is KDM. What is yours?

Note that mate-terminal and Konsole behave differently in regards to the signals. Mate-terminal does not seem to do anything but Konsole seems to unblock SIGINT and SIGHUP.

Comment 4 Wolfgang Ulbrich 2013-11-30 19:34:38 UTC
(In reply to Alexander Murashkin from comment #3)
> I am using normal Fedora 19 release. But my display manager is KDM. What is
> yours?
> 
> Note that mate-terminal and Konsole behave differently in regards to the
> signals. Mate-terminal does not seem to do anything but Konsole seems to
> unblock SIGINT and SIGHUP.

I'm using lightdm as display mananager (standard for mate) and Konsole isn't installed on my installations.
I played a bit around with './signal_catcher -w -i' and send INT/HUP/TERM signals from another mate-terminal, everything works as expected.

[rave@mother Downloads]$ ./signal_catcher -w -i
inherited sigprocmask  empty
  working sigprocmask  empty
Process 26982 is waiting for a signal

Got signal 2
[rave@mother Downloads]$

[rave@mother Downloads]$ ./signal_catcher -w -i
inherited sigprocmask  empty
  working sigprocmask  empty
Process 27061 is waiting for a signal

Got signal 1
[rave@mother Downloads]$ 

[rave@mother Downloads]$ ./signal_catcher -w -i
inherited sigprocmask  empty
  working sigprocmask  empty
Process 27093 is waiting for a signal
Beendet
[rave@mother Downloads]$ 
(Beendet=terminate)

But i know from another report that a mate/kde parallel installation can sometimes cause probs, but this was gtk settings from kde.
Do you have the same experience with xfce's terminal or gnome-terminal?

Comment 5 Wolfgang Ulbrich 2013-11-30 19:38:35 UTC
KDE isn't installed here.


Note You need to log in before you can comment on or make changes to this bug.