[Konsole-devel] [Bug 170418] SIGALRM sometimes not delivered when using Konsole

Soos Gergely sogerc1 at gmail.com
Fri Oct 3 23:16:54 UTC 2008


http://bugs.kde.org/show_bug.cgi?id=170418





--- Comment #2 from Soos Gergely <sogerc1 gmail com>  2008-10-04 01:16:44 ---
I wrote a small C code to test whether this is a perl hiccup and the answer is
that it is not.
Because I really need that alarm signal I spent a lot of time searching the
internet for any clue but the eureka came when I noticed a difference in
konsole's /proc/*/status when the signal is delivered and when it isn't.
When SIGALRM is not delivered there is a line saying:
SigBlk: 0000000000002000
When SIGALRM is delivered you can see only zeros.
After a lot of searching I found out that this could mean that the alarm signal
is blocked.
I have to confess I did not know that signals can be blocked and what's even
worse: the list of blocked signals is inherited from the parent process (the
manpage for sigaction should state this in huge block letters). Now that I do
know the solution is easy:

use POSIX;
$sigset = POSIX::SigSet->new;
$sigset->fillset();
sigprocmask(SIG_UNBLOCK,$sigset);

very similar to what you would do in a C code.

I also found out that the source of this issue does not come from konsole but
kdeinit (I saw that the /proc/*/exe links to /usr/bin/kdeinit for the konsole's
process and if I start konsole from an xterm the issue disappears). Somehow
(erroneously I guess) kdeinit blocks the alarm signal and while I can do a
workaround in my script other people may not be as lucky if they find this
issue in a compiled C code provided by a distribution.

I still can't tell when and why is the alarm signal blocked. Please respond if
you think I can do anything to help.


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list