bash52-035.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-035
  5. Bug-Reported-by: Henry Bent <henry.r.bent@gmail.com>
  6. Bug-Reference-ID: <CAEdTPBdD0WOW2n0-y-XyZ_VwhbiG-oS3bXfGkOPPG617rGH-Ww@mail.gmail.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00044.html
  8. Bug-Description:
  9. There are systems that supply one of select or pselect, but not both.
  10. Patch (apply with `patch -p0'):
  11. https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00058.html
  12. *** ../bash/bash-5.2-patched/lib/readline/input.c 2022-04-08 15:43:24.000000000 -0400
  13. --- lib/readline/input.c 2022-11-16 09:10:41.000000000 -0500
  14. ***************
  15. *** 152,156 ****
  16. --- 152,158 ----
  17. int _rl_timeout_init (void);
  18. int _rl_timeout_sigalrm_handler (void);
  19. + #if defined (RL_TIMEOUT_USE_SELECT)
  20. int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
  21. + #endif
  22. static void _rl_timeout_handle (void);
  23. ***************
  24. *** 249,253 ****
  25. int chars_avail, k;
  26. char input;
  27. ! #if defined(HAVE_SELECT)
  28. fd_set readfds, exceptfds;
  29. struct timeval timeout;
  30. --- 251,255 ----
  31. int chars_avail, k;
  32. char input;
  33. ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
  34. fd_set readfds, exceptfds;
  35. struct timeval timeout;
  36. ***************
  37. *** 806,810 ****
  38. unsigned char c;
  39. int fd;
  40. ! #if defined (HAVE_PSELECT)
  41. sigset_t empty_set;
  42. fd_set readfds;
  43. --- 808,812 ----
  44. unsigned char c;
  45. int fd;
  46. ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
  47. sigset_t empty_set;
  48. fd_set readfds;
  49. *** ../bash-5.2-patched/lib/sh/input_avail.c 2021-05-24 11:16:33.000000000 -0400
  50. --- lib/sh/input_avail.c 2022-11-16 09:12:48.000000000 -0500
  51. ***************
  52. *** 34,40 ****
  53. #endif /* HAVE_SYS_FILE_H */
  54. ! #if defined (HAVE_PSELECT)
  55. ! # include <signal.h>
  56. ! #endif
  57. #if defined (HAVE_UNISTD_H)
  58. --- 34,38 ----
  59. #endif /* HAVE_SYS_FILE_H */
  60. ! #include <signal.h>
  61. #if defined (HAVE_UNISTD_H)
  62. ***************
  63. *** 108,115 ****
  64. {
  65. int result, chars_avail;
  66. - #if defined(HAVE_SELECT)
  67. - fd_set readfds, exceptfds;
  68. - #endif
  69. #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
  70. sigset_t set, oset;
  71. #endif
  72. --- 106,111 ----
  73. {
  74. int result, chars_avail;
  75. #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
  76. + fd_set readfds, exceptfds;
  77. sigset_t set, oset;
  78. #endif
  79. ***************
  80. *** 122,132 ****
  81. chars_avail = 0;
  82. ! #if defined (HAVE_SELECT)
  83. FD_ZERO (&readfds);
  84. FD_ZERO (&exceptfds);
  85. FD_SET (fd, &readfds);
  86. FD_SET (fd, &exceptfds);
  87. - #endif
  88. - #if defined (HAVE_SELECT) || defined (HAVE_PSELECT)
  89. sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
  90. # ifdef SIGCHLD
  91. --- 115,123 ----
  92. chars_avail = 0;
  93. ! #if defined (HAVE_PSELECT) || defined (HAVE_SELECT)
  94. FD_ZERO (&readfds);
  95. FD_ZERO (&exceptfds);
  96. FD_SET (fd, &readfds);
  97. FD_SET (fd, &exceptfds);
  98. sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
  99. # ifdef SIGCHLD
  100. *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
  101. --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
  102. ***************
  103. *** 26,30 ****
  104. looks for to find the patch level (for the sccs version string). */
  105. ! #define PATCHLEVEL 34
  106. #endif /* _PATCHLEVEL_H_ */
  107. --- 26,30 ----
  108. looks for to find the patch level (for the sccs version string). */
  109. ! #define PATCHLEVEL 35
  110. #endif /* _PATCHLEVEL_H_ */