GNU bug report logs - #78920
30.1; Process sentinel is not called when DNS lookup fails

Previous Next

Package: emacs;

Reported by: Shawn Henson <shawn <at> shenso.name>

Date: Sat, 28 Jun 2025 23:27:04 UTC

Severity: normal

Found in version 30.1

Full log


Message #8 received at 78920 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Shawn Henson <shawn <at> shenso.name>
Cc: 78920 <at> debbugs.gnu.org
Subject: Re: bug#78920: 30.1;
 Process sentinel is not called when DNS lookup fails
Date: Sun, 29 Jun 2025 08:13:04 +0300
> Date: Sat, 28 Jun 2025 18:04:07 -0400
> From: Shawn Henson <shawn <at> shenso.name>
> 
> I was testing a function of mine which wraps `url-retrieve', and I found
> myself confused that my callback was not being reached with bad
> host names, and upon debugging discovered the process sentinel was not
> being called at all. Using the Lisp debugger added further confusion
> because the process status of the returned buffer would be "failed", but
> this was not the case during normal evaluation due to race conditions.
> 
> You can reproduce this with make-network-process:
> 
> ```
> (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)))
> ```
> 
> After evaluation, the *Messages* buffer includes:
> 
> ```
> process status: connect
> ```

What happens if you use ':nowait nil' instead?  Is the sentinel get
called?




This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.