bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31901: Incorrect make-network-process + nowait state handling for no


From: Mike Kazantsev
Subject: bug#31901: Incorrect make-network-process + nowait state handling for non-existing unix sockets in emacs-26.1
Date: Sun, 22 Jul 2018 19:54:58 +0500

On Sun, 22 Jul 2018 13:40:51 +0200
Lars Ingebrigtsen <larsi@gnus.org> wrote:

> OK, I've now fixed the async error case (on master), I think:
> 
>   (process-live-p socket)
>   nil
>   (process-status socket)
>   file-missing
> 
> I've fixed this on master, because I'm not 100% sure that my fix is
> completely correct.  Should we perhaps also call a sentinel in the async
> error case?

Unless I misunderstood the question, for me as a user, it would be more
obvious to get this error in a sentinel call than not with emacs 26,
because that's how :nowait is documented to work now:

  The recommended way to deal with asynchronous sockets is to avoid
  interacting with them until they have changed status to "run".
  This is most easily done from a process sentinel.

https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.26

  If bool is non-nil for a stream connection, return without waiting
  for the connection to complete. When the connection succeeds or
  fails, Emacs will call the sentinel function, with a second argument
  matching "open" (if successful) or "failed".

https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Processes.html
 

Given either of these guidelines, it'd be more surprising to not get
error state in the sentinel call with ":nowait t" in emacs-26.

(while ":nowait nil" signaling 'file-error is kinda expected)


-- 
Mike Kazantsev // fraggod.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]