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

From: Robert Pluim <[email-masked]>
Date: Sun, 29 Jun 2025 18:28:14 +0200

>>>>> On Sun, 29 Jun 2025 05:17:18 -0400, Shawn Henson <[email-masked]> said:
    >> Yes, but when the problem is with the DNS resolution, there's no
    >> connection, and technically no running process. The "failed" status
    >> is never reached because of that. Robert, WDYT? 

For ":nowait nil", yes. Except in that case we should probably not leave
a "failed" process lying around.

    Shawn> I see, though, interestingly if you are to run the `list-processes'
    Shawn> you will see it persist there
    Shawn> indefinitely with a "failed" status.  And if you do kill it, then the
    Shawn> process sentinel will be
    Shawn> called.

Hmm, that seems wrong. When using async DNS, which we will only do for
":nowait t", Emacs will create the process, and then deactivate it
upon DNS failure with a status of "failed". I donʼt think the sentinel
gets called, but I havenʼt tested it.

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.

Robert
--