bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ncurses and SIGINFO


From: Thomas Dickey
Subject: Re: ncurses and SIGINFO
Date: Mon, 7 Feb 2005 19:46:07 -0500 (EST)

On Tue, 8 Feb 2005, BenV wrote:

Heia,

A friend recently pointed my towards the in my opinion useful
signal SIGINFO, which gives some status info in a bunch of FreeBSD
programs like fsck. (I just started out with FreeBSD ;))
This signal is normally sent by pressing ctrl-t, depending
on your setup of course.

Anyway, we were hacking a bit through the systat sources to try to make
it do something useful on SIGINFO, but we ran into a little problem:
systat uses getch() to fetch it's keyboard input.
Since signals like SIGINT come through as a signal, I simply added a signal
handler for SIGINFO, compiled it, and: nothing happens. :)

But ncurses isn't masking it (it only cares about a handful of signals).
However, ncurses does put the terminal in raw mode, so editing functions
that are associated with various control keys will not be active.  You
can see this by tracing the process, e.g., with ktrace.

Adding a keyboard event for ctrl-t did fix it, so it seems that curses
completely ignores the whole SIGINFO deal. (sending the signal through
kill also works, so the handler code was ok).

Now my question:
Is this intentional? If so, can anyone tell me a portable way of determining
the siginfo/status key?


--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]