Red Hat Bugzilla – Bug 139938
cscope does not handle SIGWINCH
Last modified: 2007-11-30 17:10:55 EST
Description of problem:
cscope does not handle SIGWINCH which causes it to terminate if run
out of a terminal window in X and you resize the window.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. open a terminal window from X (GNOME, KDE etc shouldn't matter)
2. go to a directory w/ source code and run 'cscope -R'
3. Attempt to resize the terminal window and watch cscope exit.
Window is resized but Cscope terminates
Resizing the term window cscope is running in shouldn't kill it.
cscope needs a SIGWINCH handler. See web pages like:
The gist of it is that a new SIGWINCH handler function should contain:
int nh, nw;
getmaxyx(stdscr, nh, nw);
resizeterm (nh, nw);
Created attachment 107237 [details]
patch to allow cscope to be resized without exiting
I've submitted this patch upstream, and will be integrating it into all of our
packages barring any serious objections from the maintainer.
Created attachment 107270 [details]
new version of patch that doesnt break ia64 and other platforms.
probably shouldn't set sa_restorer as its not defined on all platforms, and is
depricated. New patch attached.
Created attachment 107500 [details]
new version of the patch that moves resize work out of signal handler
In line oriented mode (-l) it still crashes. This is used by cscope integration in
vim. Everytime the window is resized the cscope background process crashes. Maybe
the handler is enabled only when "GUI" is enabled?