Subject: bug#78920: 30.1; Process sentinel is not called when DNS lookup fails

From: Eli Zaretskii <[email-masked]>
Date: Mon, 30 Jun 2025 15:20:53 +0300

> From: Shawn Henson <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Sun, 29 Jun 2025 17:22:36 -0400
> 
> Robert Pluim <[email-masked]> writes:
> 
> > I wonder what Emacs does for ":nowait t" without async DNS, when the
> > connect fails. Iʼd expect it to call the sentinel with a "failed"
> > status.
> 
> Is there a trivial way to test this?

Run the recipe on MS-Windows ;-)

The result is that we signal an error:

  Debugger entered--Lisp error: (error "thisisnotarealhostname/80 No such host is known. ")
    make-network-process(:name "dns-fail-test" :buffer "dns-fail-test-buf" :host "thisisnotarealhostname" :service 80 :nowait t :sentinel #f(lambda (process event) [t] (print event)))
    (let ((my-test-proc (make-network-process :name "dns-fail-test" :buffer "dns-fail-test-buf" :host "thisisnotarealhostname" :service 80 :nowait t :sentinel #'(lambda (process event) (print event))))) (message "process status: %s" (process-status my-test-proc)))
    (progn (let ((my-test-proc (make-network-process :name "dns-fail-test" :buffer "dns-fail-test-buf" :host "thisisnotarealhostname" :service 80 :nowait t :sentinel #'(lambda (process event) (print event))))) (message "process status: %s" (process-status my-test-proc))))
    eval((progn (let ((my-test-proc (make-network-process :name "dns-fail-test" :buffer "dns-fail-test-buf" :host "thisisnotarealhostname" :service 80 :nowait t :sentinel #'(lambda ... ...)))) (message "process status: %s" (process-status my-test-proc)))) t)

and there's no process shown by list-processes.