[cscope] Resolves: bz638756

Neil Horman nhorman at fedoraproject.org
Thu Sep 30 14:41:53 UTC 2010


commit 53f752045b45d7378f73bb593c11814d5a224f26
Author: Neil Horman <nhorman at shamino.rdu.redhat.com>
Date:   Thu Sep 30 10:41:45 2010 -0400

    Resolves: bz638756

 cscope-15.7-sig_pipe.patch |   24 ++++++++++++++++++++++++
 cscope.spec                |    7 ++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/cscope-15.7-sig_pipe.patch b/cscope-15.7-sig_pipe.patch
new file mode 100644
index 0000000..93f069b
--- /dev/null
+++ b/cscope-15.7-sig_pipe.patch
@@ -0,0 +1,24 @@
+diff -up cscope-15.7a/src/main.c.orig cscope-15.7a/src/main.c
+--- cscope-15.7a/src/main.c.orig	2009-04-10 10:36:38.000000000 -0400
++++ cscope-15.7a/src/main.c	2010-09-30 10:33:19.909355954 -0400
+@@ -379,6 +379,12 @@ cscope: Could not create private temp di
+     /* ditto the TERM signal */
+     signal(SIGTERM, myexit);
+ 
++    /* ignore PIPE signal, so myexit() will have a chance to clean up in
++     * linemode, while in curses mode the "|" command can cause a pipe signal
++     * too
++     */
++    signal(SIGPIPE, SIG_IGN);
++
+     /* if the database path is relative and it can't be created */
+     if (reffile[0] != '/' && access(".", WRITE) != 0) {
+ 
+@@ -400,7 +406,6 @@ cscope: Could not create private temp di
+ 
+     if (linemode == NO) {
+ 	signal(SIGINT, SIG_IGN);	/* ignore interrupts */
+-	signal(SIGPIPE, SIG_IGN);/* | command can cause pipe signal */
+ 
+ #if defined(KEY_RESIZE) && !defined(__DJGPP__)
+ 	winch_action.sa_sigaction = sigwinch_handler;
diff --git a/cscope.spec b/cscope.spec
index ff55c1e..139611a 100644
--- a/cscope.spec
+++ b/cscope.spec
@@ -1,7 +1,7 @@
 Summary: C source code tree search and browse tool 
 Name: cscope
 Version: 15.7a
-Release: 1%{?dist}
+Release: 2%{?dist}
 Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.7a.tar.bz2
 URL: http://cscope.sourceforge.net
 License: BSD 
@@ -16,6 +16,7 @@ BuildRequires: pkgconfig ncurses-devel flex bison m4
 Patch0:cscope-15.6-findassign.patch
 Patch1:cscope-15.6-ocs.patch
 Patch2:cscope-15.6-xcscope-man.patch
+Patch3:cscope-15.7-sig_pipe.patch
 
 %description
 cscope is a mature, ncurses based, C source code tree browsing tool.  It 
@@ -29,6 +30,7 @@ matches for use in file editing.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %configure
@@ -77,6 +79,9 @@ rm -f %{xemacs_lisp_path}/xcscope.el
 rm -f %{emacs_lisp_path}/xcscope.el
 
 %changelog
+* Thu Sep 30 2010 Neil Horman <nhorman at redhat.com - 15.7a-2
+- Ignore SIGPIPE in line mode (bz 638756)
+
 * Mon Mar 1 2010 Neil Horman <nhorman at redhat.com> - 15.7a-1
 - Update to latest upstream release (bz 569043)
 


More information about the scm-commits mailing list