• Noam Postavsky's avatar
    Let debugger handle process spawn errors on w32 (Bug#33016) · 9800df69
    Noam Postavsky authored
    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.
    9800df69
callproc-tests.el 2.72 KB