Bug 139938 - cscope does not handle SIGWINCH
cscope does not handle SIGWINCH
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: cscope (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Neil Horman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-18 15:57 EST by Mike Gahagan
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-23 11:16:49 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to allow cscope to be resized without exiting (3.02 KB, patch)
2004-11-22 15:35 EST, Neil Horman
no flags Details | Diff
new version of patch that doesnt break ia64 and other platforms. (2.98 KB, patch)
2004-11-22 20:01 EST, Neil Horman
no flags Details | Diff
new version of the patch that moves resize work out of signal handler (2.59 KB, patch)
2004-11-27 12:52 EST, Neil Horman
no flags Details | Diff

  None (edit)
Description Mike Gahagan 2004-11-18 15:57:05 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):


How reproducible:

always

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.
  
Actual results:

Window is resized but Cscope terminates

Expected results:

Resizing the term window cscope is running in shouldn't kill it.

Additional info:
Comment 1 Frank Ch. Eigler 2004-11-18 16:17:12 EST
cscope needs a SIGWINCH handler.  See web pages like:
http://sunse.jinr.ru/local/ncurses/ncurses-intro.html
http://www.apmaths.uwo.ca/~xli/ncurses.html

The gist of it is that a new SIGWINCH handler function should contain:

   int nh, nw;
   getmaxyx(stdscr, nh, nw);
   resizeterm (nh, nw);
Comment 3 Neil Horman 2004-11-22 15:35:19 EST
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.
Comment 4 Neil Horman 2004-11-22 20:01:34 EST
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.
Comment 5 Neil Horman 2004-11-27 12:52:36 EST
Created attachment 107500 [details]
new version of the patch that moves resize work out of signal handler
Comment 6 Ronald Wahl 2007-02-26 19:16:35 EST
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?

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