tcsh/tcsh-6.19.00-020-make-heredoc-interruptible-again.patch
David Kaspar [Dee'Kej] 11d5852991 tcsh-6.19.00-020-make-heredoc-interruptible-again.patch added
> Make heredoc interruptible again (Mike Sullivan)
2016-05-03 17:11:23 +02:00

44 lines
946 B
Diff

From 4fc4702ec7b1e46dc620644305a9ac19250f9722 Mon Sep 17 00:00:00 2001
From: christos <christos>
Date: Sat, 31 Oct 2015 18:54:42 +0000
Subject: [PATCH] Make heredoc interruptible again (Mike Sullivan)
---
bar | 4 ----
sh.sem.c | 6 ++++++
2 files changed, 6 insertions(+), 4 deletions(-)
delete mode 100644 bar
diff --git a/bar b/bar
deleted file mode 100644
index 3305e7d..0000000
--- a/bar
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-i
diff --git a/sh.sem.c b/sh.sem.c
index 4293b1b..a904c6e 100644
--- a/sh.sem.c
+++ b/sh.sem.c
@@ -212,8 +212,14 @@ execute(struct command *t, volatile int wanttty, int *pipein, int *pipeout,
* If noexec then this is all we do.
*/
if (t->t_dflg & F_READ) {
+ int old_pintr_disabled;
+
xclose(0);
+ if (setintr)
+ pintr_push_enable(&old_pintr_disabled);
heredoc(t->t_dlef);
+ if (setintr)
+ cleanup_until(&old_pintr_disabled);
if (noexec)
xclose(0);
}
--
2.5.5