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