Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 2f3faeccae36080f0037e6821cfc3ed7 > files > 4

cscope-15.7a-7.fc16.src.rpm

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;