diff options
| author | Noam Postavsky | 2019-04-08 17:57:22 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2019-04-14 22:43:38 -0400 |
| commit | 9800df69cb7003bda1f2b98d6f11e89ba95afb9b (patch) | |
| tree | 8de5b8b10e6a0743b7f227bef6bf87ffdb98ed4a /src/lisp.h | |
| parent | fc0f469fb5b5eb28ca4d9948190be6cb1bd8156e (diff) | |
| download | emacs-9800df69cb7003bda1f2b98d6f11e89ba95afb9b.tar.gz emacs-9800df69cb7003bda1f2b98d6f11e89ba95afb9b.zip | |
Let debugger handle process spawn errors on w32 (Bug#33016)
Since child_setup() is called between block_input()...unblock_input(),
when an error is signaled the Lisp debugger is prevented from
starting. Therefore, let the callers signal the error instead (which
they already do for non-w32 platforms, just the error message needs an
update).
* src/callproc.c (child_setup) [WINDOWSNT]: Don't call
report_file_error here.
(call_process) [WINDOWNT]:
* src/process.c (create_process) [WINDOWSNT]: Call report_file_errno
here instead, after the unblock_input() call, same as for !WINDOWSNT.
* src/lisp.h (CHILD_SETUP_ERROR_DESC): New preprocessor define. Flip
the containing ifndef DOS_NT branches so that it's ifdef DOS_NT.
* src/eval.c (when_entered_debugger): Remove.
(syms_of_eval) <internal-when-entered-debugger>: Define it as a Lisp
integer variable instead.
(maybe_call_debugger): Update comment.
* test/src/process-tests.el (make-process-w32-debug-spawn-error):
* test/src/callproc-tests.el (call-process-w32-debug-spawn-error): New
tests.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lisp.h b/src/lisp.h index 681efc3b52b..2915944ffec 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -4480,11 +4480,14 @@ extern void syms_of_process (void); | |||
| 4480 | extern void setup_process_coding_systems (Lisp_Object); | 4480 | extern void setup_process_coding_systems (Lisp_Object); |
| 4481 | 4481 | ||
| 4482 | /* Defined in callproc.c. */ | 4482 | /* Defined in callproc.c. */ |
| 4483 | #ifndef DOS_NT | 4483 | #ifdef DOS_NT |
| 4484 | # define CHILD_SETUP_TYPE _Noreturn void | ||
| 4485 | #else | ||
| 4486 | # define CHILD_SETUP_TYPE int | 4484 | # define CHILD_SETUP_TYPE int |
| 4485 | # define CHILD_SETUP_ERROR_DESC "Spawning child process" | ||
| 4486 | #else | ||
| 4487 | # define CHILD_SETUP_TYPE _Noreturn void | ||
| 4488 | # define CHILD_SETUP_ERROR_DESC "Doing vfork" | ||
| 4487 | #endif | 4489 | #endif |
| 4490 | |||
| 4488 | extern CHILD_SETUP_TYPE child_setup (int, int, int, char **, bool, Lisp_Object); | 4491 | extern CHILD_SETUP_TYPE child_setup (int, int, int, char **, bool, Lisp_Object); |
| 4489 | extern void init_callproc_1 (void); | 4492 | extern void init_callproc_1 (void); |
| 4490 | extern void init_callproc (void); | 4493 | extern void init_callproc (void); |