]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.4 patch 16
authorChet Ramey <chet.ramey@case.edu>
Mon, 29 Jan 2018 21:04:20 +0000 (16:04 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 29 Jan 2018 21:04:20 +0000 (16:04 -0500)
lib/sh/zread.c
patchlevel.h

index 868f970527e076535ee7723ca81f71eefb1fc08d..496f20b87726670839b655a7ea18407f69792f53 100644 (file)
@@ -37,7 +37,10 @@ extern int errno;
 #  define SEEK_CUR 1
 #endif
 
+extern int executing_builtin;
+
 extern void check_signals_and_traps (void);
+extern void check_signals (void);
 extern int signal_is_trapped (int);
 
 /* Read LEN bytes from FD into BUF.  Retry the read on EINTR.  Any other
@@ -50,21 +53,13 @@ zread (fd, buf, len)
 {
   ssize_t r;
 
-#if 0
-#if defined (HAVE_SIGINTERRUPT)
-  if (signal_is_trapped (SIGCHLD))
-    siginterrupt (SIGCHLD, 1);
-#endif
-#endif
-
   while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
-    check_signals_and_traps ();        /* XXX - should it be check_signals()? */
-
-#if 0 
-#if defined (HAVE_SIGINTERRUPT)
-  siginterrupt (SIGCHLD, 0);
-#endif
-#endif
+    /* XXX - bash-5.0 */
+    /* We check executing_builtin and run traps here for backwards compatibility */
+    if (executing_builtin)
+      check_signals_and_traps ();      /* XXX - should it be check_signals()? */
+    else
+      check_signals ();
 
   return r;
 }
index 6e9ed3fc898ad66e9b99411775508d5b5a563174..9074f4ddf987981a48310ff80666659c95600300 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 15
+#define PATCHLEVEL 16
 
 #endif /* _PATCHLEVEL_H_ */