From 14793aa6dc38916891b678e4d6831aa63dd530f12c9ed5aef5573266e901fdcf Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 16 Oct 2007 00:37:53 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tcsh?expand=0&rev=9 --- tcsh-6.15.00-history.dif | 111 ++++++++++++++++++++++++++------------- tcsh.changes | 5 ++ tcsh.spec | 4 +- 3 files changed, 82 insertions(+), 38 deletions(-) diff --git a/tcsh-6.15.00-history.dif b/tcsh-6.15.00-history.dif index f5c5880..c62ba5b 100644 --- a/tcsh-6.15.00-history.dif +++ b/tcsh-6.15.00-history.dif @@ -1,5 +1,5 @@ --- sh.c -+++ sh.c 2007-10-12 00:00:00.000000000 +0200 ++++ sh.c 2007-10-15 12:03:11.216084278 +0200 @@ -1770,7 +1770,7 @@ static Char *jobargv[2] = {STRjobs, 0} * and finally go through the normal error mechanism, which * gets a chance to make the shell go away. @@ -9,6 +9,44 @@ void pintr(void) +--- sh.err.c ++++ sh.err.c 2007-10-15 11:53:17.760845847 +0200 +@@ -51,6 +51,7 @@ char *seterr = NULL; /* Holds last err + #define ERR_NAME 0x10000000 + #define ERR_SILENT 0x20000000 + #define ERR_OLD 0x40000000 ++#define ERR_INTERRUPT 0x80000000 + + #define ERR_SYNTAX 0 + #define ERR_NOTALLOWED 1 +@@ -600,7 +601,8 @@ stderror(unsigned int id, ...) + * else to FSHOUT/FSHDIAG. See flush in sh.print.c. + */ + flush();/*FIXRESET*/ +- haderr = 1; /* Now to diagnostic output */ ++ if (!(flags & ERR_INTERRUPT)) ++ haderr = 1; /* Now to diagnostic output */ + + if (!(flags & ERR_SILENT)) { + if (flags & ERR_NAME) +@@ -643,5 +645,6 @@ stderror(unsigned int id, ...) + if (tpgrp > 0) + (void) tcsetpgrp(FSHTTY, tpgrp); + #endif +- reset(); /* Unwind */ ++ if (!(flags & ERR_INTERRUPT)) ++ reset(); /* Unwind */ + } +--- sh.err.h ++++ sh.err.h 2007-10-15 11:21:24.718454966 +0200 +@@ -5,6 +5,7 @@ + #define ERR_NAME 0x10000000 + #define ERR_SILENT 0x20000000 + #define ERR_OLD 0x40000000 ++#define ERR_INTERRUPT 0x80000000 + #define ERR_SYNTAX 0 + #define ERR_NOTALLOWED 1 + #define ERR_WTOOLONG 2 --- sh.h +++ sh.h 2007-10-12 00:00:00.000000000 +0200 @@ -548,6 +548,7 @@ EXTERN int neednote IZERO; /* Need to @@ -41,52 +79,51 @@ --- sh.print.c -+++ sh.print.c 2007-10-12 00:00:00.000000000 +0200 -@@ -234,7 +234,8 @@ flush(void) ++++ sh.print.c 2007-10-15 12:09:15.994329114 +0200 +@@ -222,7 +222,8 @@ drainoline(void) + void + flush(void) + { +- int unit; ++ int unit, oldexitset = exitset; ++ unsigned int errid = ERR_SILENT; + static int interrupted = 0; + + /* int lmode; */ +@@ -231,10 +232,14 @@ flush(void) + return; + if (GettingInput && !Tty_raw_mode && linp < &linbuf[sizeof linbuf - 10]) + return; ++ if (handle_intr) { ++ errid |= ERR_INTERRUPT; ++ exitset = 1; ++ } if (interrupted) { interrupted = 0; linp = linbuf; /* avoid recursion as stderror calls flush */ - stderror(ERR_SILENT); -+ if (handle_intr == 0) -+ stderror(ERR_SILENT); ++ stderror(errid); } interrupted = 1; if (haderr) -@@ -256,6 +257,8 @@ flush(void) - #ifdef EIO - /* We lost our tty */ - case EIO: -+ if (handle_intr) -+ break; - #endif - #ifdef ENXIO - /* -@@ -263,12 +266,16 @@ flush(void) - * we lose our tty. - */ - case ENXIO: -+ if (handle_intr) -+ break; - #endif - /* - * IRIX 6.4 bogocity? - */ - #ifdef ENOTTY - case ENOTTY: -+ if (handle_intr) -+ break; - #endif - #ifdef EBADF - case EBADF: -@@ -284,6 +291,8 @@ flush(void) - */ - #ifdef EDQUOT +@@ -286,13 +291,14 @@ flush(void) case EDQUOT: -+ if (handle_intr) -+ break; #endif /* Nothing to do, but die */ - xexit(1); +- xexit(1); +- break; ++ if (handle_intr == 0) ++ xexit(1); + default: +- stderror(ERR_SILENT); ++ stderror(errid); + break; + } + ++ exitset = oldexitset; + linp = linbuf; + interrupted = 0; + } --- tc.sig.c +++ tc.sig.c 2007-10-12 00:00:00.000000000 +0200 @@ -60,25 +60,34 @@ int alrmcatch_disabled; /* = 0; */ diff --git a/tcsh.changes b/tcsh.changes index d890fba..fdbdd2b 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 15 12:11:06 CEST 2007 - werner@suse.de + +- Improve bug fix (bug #331627) + ------------------------------------------------------------------- Fri Oct 12 18:18:11 CEST 2007 - werner@suse.de diff --git a/tcsh.spec b/tcsh.spec index 7b37b46..1c42940 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -18,7 +18,7 @@ Group: System/Shells Requires: gawk textutils AutoReqProv: on Version: 6.15.00 -Release: 22 +Release: 25 Summary: The C SHell Source: ftp.astron.com:/pub/tcsh/tcsh-6.15.00.tar.bz2 Source1: nls-iconv @@ -135,6 +135,8 @@ Authors: %doc %{_mandir}/man1/tcsh.1.gz %{_datadir}/locale/*/LC_MESSAGES/tcsh %changelog +* Mon Oct 15 2007 - werner@suse.de +- Improve bug fix (bug #331627) * Fri Oct 12 2007 - werner@suse.de - Fix save history bug: do not jump out from handler for pending signals like for SIGHUP, just run the handler up to its end and