aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-03-19 18:44:15 -0700
committerPaul Eggert2016-03-19 18:45:09 -0700
commit9d5f23511241e6a0805ddfab20926271e23fa698 (patch)
tree5d9e588151f050399dd7c6f2680627f6b48b0fff /src
parent070b9de4e39b8b6f1334f1d6d81cd9ad9634d75b (diff)
downloademacs-9d5f23511241e6a0805ddfab20926271e23fa698.tar.gz
emacs-9d5f23511241e6a0805ddfab20926271e23fa698.zip
No need to block input when reading directories
* src/dired.c: Don’t include blockinput.h. (open_directory, directory_files_internal_unwind) (directory_files_internal, file_attributes): Don’t block input here, as the reasons for blocking input should no longer apply. See blockinput.h FIXME. (Bug#22996).
Diffstat (limited to 'src')
-rw-r--r--src/dired.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/dired.c b/src/dired.c
index ebc7029cc7f..5d0e327ee7b 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -42,7 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
42#include "buffer.h" 42#include "buffer.h"
43#include "coding.h" 43#include "coding.h"
44#include "regex.h" 44#include "regex.h"
45#include "blockinput.h"
46 45
47#ifdef MSDOS 46#ifdef MSDOS
48#include "msdos.h" /* for fstatat */ 47#include "msdos.h" /* for fstatat */
@@ -69,8 +68,6 @@ open_directory (Lisp_Object dirname, int *fdp)
69 DIR *d; 68 DIR *d;
70 int fd, opendir_errno; 69 int fd, opendir_errno;
71 70
72 block_input ();
73
74#ifdef DOS_NT 71#ifdef DOS_NT
75 /* Directories cannot be opened. The emulation assumes that any 72 /* Directories cannot be opened. The emulation assumes that any
76 file descriptor other than AT_FDCWD corresponds to the most 73 file descriptor other than AT_FDCWD corresponds to the most
@@ -94,8 +91,6 @@ open_directory (Lisp_Object dirname, int *fdp)
94 } 91 }
95#endif 92#endif
96 93
97 unblock_input ();
98
99 if (!d) 94 if (!d)
100 report_file_errno ("Opening directory", dirname, opendir_errno); 95 report_file_errno ("Opening directory", dirname, opendir_errno);
101 *fdp = fd; 96 *fdp = fd;
@@ -111,12 +106,9 @@ directory_files_internal_w32_unwind (Lisp_Object arg)
111#endif 106#endif
112 107
113static void 108static void
114directory_files_internal_unwind (void *dh) 109directory_files_internal_unwind (void *d)
115{ 110{
116 DIR *d = dh;
117 block_input ();
118 closedir (d); 111 closedir (d);
119 unblock_input ();
120} 112}
121 113
122/* Return the next directory entry from DIR; DIR's name is DIRNAME. 114/* Return the next directory entry from DIR; DIR's name is DIRNAME.
@@ -307,9 +299,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
307 } 299 }
308 } 300 }
309 301
310 block_input ();
311 closedir (d); 302 closedir (d);
312 unblock_input ();
313#ifdef WINDOWSNT 303#ifdef WINDOWSNT
314 if (attrs) 304 if (attrs)
315 Vw32_get_true_file_attributes = w32_save; 305 Vw32_get_true_file_attributes = w32_save;
@@ -959,10 +949,8 @@ file_attributes (int fd, char const *name, Lisp_Object id_format)
959 949
960 if (!(NILP (id_format) || EQ (id_format, Qinteger))) 950 if (!(NILP (id_format) || EQ (id_format, Qinteger)))
961 { 951 {
962 block_input ();
963 uname = stat_uname (&s); 952 uname = stat_uname (&s);
964 gname = stat_gname (&s); 953 gname = stat_gname (&s);
965 unblock_input ();
966 } 954 }
967 955
968 filemodestring (&s, modes); 956 filemodestring (&s, modes);