[tcsh] - Make wait builtin command interruptible Resolves: #440465

Vojtěch Vítek vvitek at fedoraproject.org
Tue Jan 4 15:16:06 UTC 2011


commit 0463ce5b5baf752a849a8ba8c4e26c069a8af3cd
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date:   Tue Dec 21 10:05:00 2010 +0100

    - Make wait builtin command interruptible
      Resolves: #440465

 tcsh-6.17.00-wait-intr.patch |   34 ++++++++++++++++++++++++++++++++++
 tcsh.spec                    |    7 +++++++
 2 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/tcsh-6.17.00-wait-intr.patch b/tcsh-6.17.00-wait-intr.patch
new file mode 100644
index 0000000..4b4ff01
--- /dev/null
+++ b/tcsh-6.17.00-wait-intr.patch
@@ -0,0 +1,34 @@
+--- tcsh-6.17.00/sh.proc.c	2009-06-25 23:15:37.000000000 +0200
++++ sh.proc.c	2010-11-25 17:36:16.500751242 +0100
+@@ -596,6 +596,10 @@ loop:
+ 	    pp->p_flags & PRUNNING) {
+ 	    handle_pending_signals();
+ 	    sigsuspend(&pause_mask);
++	    if (pintr_pending) {
++		handle_pending_signals();
++		break;
++	    }
+ 	    handle_pending_signals();
+ 	    goto loop;
+ 	}
+--- tcsh-6.17.00/sh.h	2009-06-25 23:27:37.000000000 +0200
++++ sh.h	2010-11-26 11:42:16.160119671 +0100
+@@ -533,6 +533,7 @@ typedef union {
+  * Global flags
+  */
+ EXTERN int    chkstop IZERO;	/* Warned of stopped jobs... allow exit */
++EXTERN volatile sig_atomic_t pintr_pending;	/* Interrupted by SIGINT */
+ 
+ #if (defined(FIOCLEX) && defined(FIONCLEX)) || defined(F_SETFD)
+ # define CLOSE_ON_EXEC
+--- tcsh-6.17.00/tc.sig.c	2006-08-24 22:56:31.000000000 +0200
++++ tc.sig.c	2010-11-26 11:40:09.779223509 +0100
+@@ -55,7 +55,7 @@ sigset_interrupting(int sig, void (*fn) 
+ static volatile sig_atomic_t alrmcatch_pending; /* = 0; */
+ static volatile sig_atomic_t pchild_pending; /* = 0; */
+ static volatile sig_atomic_t phup_pending; /* = 0; */
+-static volatile sig_atomic_t pintr_pending; /* = 0; */
++volatile sig_atomic_t pintr_pending; /* = 0; */
+ int alrmcatch_disabled; /* = 0; */
+ int phup_disabled; /* = 0; */
+ int pchild_disabled; /* = 0; */
diff --git a/tcsh.spec b/tcsh.spec
index d0f6b88..100503b 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -28,6 +28,8 @@ Patch16: tcsh-6.17.00-printexitvalue.patch
 Patch17: tcsh-6.17.00-testsuite.patch
 # Accepted by upstream:
 Patch18: tcsh-6.17.00-extrafork.patch
+# Proposed to upstream: http://bugs.gw.com/view.php?id=109
+Patch19: tcsh-6.17.00-wait-intr.patch
 Provides: csh = %{version}
 Requires(post): grep
 Requires(postun): coreutils, grep
@@ -61,6 +63,7 @@ like syntax.
 %patch16 -p1 -b .printexitvalue
 %patch17 -p1 -b .testsuite
 %patch18 -p1 -b .extrafork
+%patch19 -p1 -b .wait-intr
 
 for i in Fixes WishList; do
  iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
@@ -134,6 +137,10 @@ fi
 %{_mandir}/man1/*.1*
 
 %changelog
+* Tue Dec 21 2010 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 6.17-10
+- Make wait builtin command interruptible
+  Resolves: #440465
+
 * Wed Oct  6 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 6.17-9
 - Remove fork when tcsh processes backquotes
 


More information about the scm-commits mailing list