|
|
50ece2 |
From c9f1b04651dae16e33f0aa8974c5122e26b362ae Mon Sep 17 00:00:00 2001
|
|
|
50ece2 |
From: Chet Ramey <chet.ramey@case.edu>
|
|
|
50ece2 |
Date: Mon, 29 Jan 2018 16:04:20 -0500
|
|
|
50ece2 |
Subject: [PATCH] Bash-4.4 patch 16
|
|
|
50ece2 |
|
|
|
50ece2 |
---
|
|
|
50ece2 |
lib/sh/zread.c | 23 +++++++++--------------
|
|
|
50ece2 |
patchlevel.h | 2 +-
|
|
|
50ece2 |
2 files changed, 10 insertions(+), 15 deletions(-)
|
|
|
50ece2 |
|
|
|
50ece2 |
diff --git a/lib/sh/zread.c b/lib/sh/zread.c
|
|
|
50ece2 |
index 868f9705..496f20b8 100644
|
|
|
50ece2 |
--- a/lib/sh/zread.c
|
|
|
50ece2 |
+++ b/lib/sh/zread.c
|
|
|
50ece2 |
@@ -37,7 +37,10 @@ extern int errno;
|
|
|
50ece2 |
# define SEEK_CUR 1
|
|
|
50ece2 |
#endif
|
|
|
50ece2 |
|
|
|
50ece2 |
+extern int executing_builtin;
|
|
|
50ece2 |
+
|
|
|
50ece2 |
extern void check_signals_and_traps (void);
|
|
|
50ece2 |
+extern void check_signals (void);
|
|
|
50ece2 |
extern int signal_is_trapped (int);
|
|
|
50ece2 |
|
|
|
50ece2 |
/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other
|
|
|
50ece2 |
@@ -50,21 +53,13 @@ zread (fd, buf, len)
|
|
|
50ece2 |
{
|
|
|
50ece2 |
ssize_t r;
|
|
|
50ece2 |
|
|
|
50ece2 |
-#if 0
|
|
|
50ece2 |
-#if defined (HAVE_SIGINTERRUPT)
|
|
|
50ece2 |
- if (signal_is_trapped (SIGCHLD))
|
|
|
50ece2 |
- siginterrupt (SIGCHLD, 1);
|
|
|
50ece2 |
-#endif
|
|
|
50ece2 |
-#endif
|
|
|
50ece2 |
-
|
|
|
50ece2 |
while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
|
|
|
50ece2 |
- check_signals_and_traps (); /* XXX - should it be check_signals()? */
|
|
|
50ece2 |
-
|
|
|
50ece2 |
-#if 0
|
|
|
50ece2 |
-#if defined (HAVE_SIGINTERRUPT)
|
|
|
50ece2 |
- siginterrupt (SIGCHLD, 0);
|
|
|
50ece2 |
-#endif
|
|
|
50ece2 |
-#endif
|
|
|
50ece2 |
+ /* XXX - bash-5.0 */
|
|
|
50ece2 |
+ /* We check executing_builtin and run traps here for backwards compatibility */
|
|
|
50ece2 |
+ if (executing_builtin)
|
|
|
50ece2 |
+ check_signals_and_traps (); /* XXX - should it be check_signals()? */
|
|
|
50ece2 |
+ else
|
|
|
50ece2 |
+ check_signals ();
|
|
|
50ece2 |
|
|
|
50ece2 |
return r;
|
|
|
50ece2 |
}
|
|
|
50ece2 |
diff --git a/patchlevel.h b/patchlevel.h
|
|
|
50ece2 |
index 6e9ed3fc..9074f4dd 100644
|
|
|
50ece2 |
--- a/patchlevel.h
|
|
|
50ece2 |
+++ b/patchlevel.h
|
|
|
50ece2 |
@@ -25,6 +25,6 @@
|
|
|
50ece2 |
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
|
|
50ece2 |
looks for to find the patch level (for the sccs version string). */
|
|
|
50ece2 |
|
|
|
50ece2 |
-#define PATCHLEVEL 15
|
|
|
50ece2 |
+#define PATCHLEVEL 16
|
|
|
50ece2 |
|
|
|
50ece2 |
#endif /* _PATCHLEVEL_H_ */
|
|
|
50ece2 |
--
|
|
|
50ece2 |
2.13.6
|
|
|
50ece2 |
|