5 Patch-ID: readline82-011
7 Bug-Reported-by: Grisha Levit <grishalevit@gmail.com>
8 Bug-Reference-ID: <CAMu=BrqWa_iNkiEwchpFmtrUhFrAanOO8pjy7VCKqRKUvqdsbw@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00075.html
13 Patch (apply with `patch -p0'):
15 Some systems (e.g., macOS) send signals early on in interactive initialization,
16 so readline should retry a failed open of the init file.
18 *** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022
19 --- bind.c Tue Apr 23 15:07:13 2024
25 ! if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0))
29 return ((char *)NULL);
34 ! file = open (filename, O_RDONLY, 0666);
35 ! /* If the open is interrupted, retry once */
36 ! if (file < 0 && errno == EINTR)
38 + RL_CHECK_SIGNALS ();
39 + file = open (filename, O_RDONLY, 0666);
42 + if ((file < 0) || (fstat (file, &finfo) < 0))
48 return ((char *)NULL);
53 if (file_size != finfo.st_size || file_size + 1 < file_size)
63 return ((char *)NULL);
65 *** ../readline-8.2/patchlevel 2013-11-15 08:11:11.000000000 -0500
66 --- patchlevel 2014-03-21 08:28:40.000000000 -0400
69 # Do not edit -- exists only for use by patch
73 # Do not edit -- exists only for use by patch