summaryrefslogtreecommitdiff
path: root/src/callproc.c
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-01-10 22:28:31 +0100
committerPhilipp Stephani <phst@google.com>2021-01-10 22:31:22 +0100
commit94344d130c2c2db90bcc47e12870d1d58f020ecf (patch)
tree58eac6671be87a7c662cc1ee0f591a8e0aee7586 /src/callproc.c
parentc7c154bb5756e0ae71d342c5d8aabf725877f186 (diff)
downloademacs-94344d130c2c2db90bcc47e12870d1d58f020ecf.tar.gz
Add functions to open a file without quitting.
In some situations, e.g. when the Lisp machinery isn't available, we can't quit. Don't check the quit flags in such situations, in case they contain garbage. * src/sysdep.c (emacs_open_noquit, emacs_openat_noquit): New variants of 'emacs_open' and 'emacs_openat' that don't check the quit flags. * src/emacs.c (main, Fdaemon_initialized): * src/pdumper.c (pdumper_load): * src/w32term.c (w32_initialize): * src/buffer.c (mmap_init): * src/callproc.c (emacs_spawn): Use them where we can't quit.
Diffstat (limited to 'src/callproc.c')
-rw-r--r--src/callproc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/callproc.c b/src/callproc.c
index 1da315bef18..cb72b070b7b 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1336,7 +1336,7 @@ emacs_spawn (pid_t *newpid, int std_in, int std_out, int std_err,
would work? */
if (std_in >= 0)
emacs_close (std_in);
- std_out = std_in = emacs_open (pty, O_RDWR, 0);
+ std_out = std_in = emacs_open_noquit (pty, O_RDWR, 0);
if (std_in < 0)
{