OBS User unknown 2007-10-16 00:37:53 +00:00 committed by Git OBS Bridge
parent f719ff0399
commit 14793aa6dc
3 changed files with 82 additions and 38 deletions

View File

@ -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; */

View File

@ -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

View File

@ -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