From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vasilij Schneidermann Newsgroups: gmane.emacs.bugs Subject: bug#62990: 30.0.50; UDP server closes connection upon receiving an empty packet Date: Sat, 9 Mar 2024 14:40:28 +0100 Message-ID: References: <87wn21br45.fsf@gmail.com> <87ttx49yg0.fsf@gmail.com> <87jzxysw06.fsf@gmail.com> <877ctysoit.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kQ24buBBC3bcmINb" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23047"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62990@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 09 14:41:42 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1riwxK-0005tF-Dr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Mar 2024 14:41:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riwx9-0005nJ-OF; Sat, 09 Mar 2024 08:41:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riwx8-0005k0-4K for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 08:41:30 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1riwx7-0004fa-Sa for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 08:41:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riwxe-0006RK-Az for bug-gnu-emacs@gnu.org; Sat, 09 Mar 2024 08:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vasilij Schneidermann Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Mar 2024 13:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62990 X-GNU-PR-Package: emacs Original-Received: via spool by 62990-submit@debbugs.gnu.org id=B62990.170999170624725 (code B ref 62990); Sat, 09 Mar 2024 13:42:02 +0000 Original-Received: (at 62990) by debbugs.gnu.org; 9 Mar 2024 13:41:46 +0000 Original-Received: from localhost ([127.0.0.1]:60937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riwxO-0006Qj-6P for submit@debbugs.gnu.org; Sat, 09 Mar 2024 08:41:46 -0500 Original-Received: from mout-p-101.mailbox.org ([80.241.56.151]:59866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riwxI-0006QL-O5 for 62990@debbugs.gnu.org; Sat, 09 Mar 2024 08:41:44 -0500 Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4TsPLP54qRz9snG; Sat, 9 Mar 2024 14:40:29 +0100 (CET) Content-Disposition: inline In-Reply-To: <877ctysoit.fsf@gmail.com> X-Rspamd-Queue-Id: 4TsPLP54qRz9snG X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281334 Archived-At: --kQ24buBBC3bcmINb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello again, > Actually, it turned out to be a small change (on top of my previous > patch) >=20 > diff --git a/src/process.c b/src/process.c > index e3233f5ad89..eca1441062d 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -6305,7 +6305,13 @@ read_and_dispose_of_process_output (struct Lisp_Pr= ocess *p, char *chars, > coding->carryover_bytes); > p->decoding_carryover =3D coding->carryover_bytes; > } > - if (SBYTES (text) > 0) > + if (SBYTES (text) > 0 > +#ifdef DATAGRAM_SOCKETS > + || (SBYTES (text) =3D=3D 0 > + && 0 <=3D p->outfd > + && DATAGRAM_CHAN_P (p->outfd)) > +#endif > + ) > /* FIXME: It's wrong to wrap or not based on debug-on-error, and > sometimes it's simply wrong to wrap (e.g. when called from > accept-process-output). */ I somehow completely overlooked this second patch and can confirm that with it, both the Emacs Lisp and Guile version of the server/client behave identically. In other words, the UDP bug is completely fixed now. I've done a cursory search on the web and did not find anything that would send empty packets via UDP, so I do doubt it would break existing code or need a opt-out setting. --kQ24buBBC3bcmINb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE0dAcySl3bqM8O17WFmfJg6zCifoFAmXsZskACgkQFmfJg6zC ifpgCQgAk7O293XsjhBsSmuN64BOUP7UCtJjJYgvW427nRWHwNQjsr/fBwDCwqRe wMDXDvD/sk0uD8wVlwGcynE5hIMf3Ayg837fJr8jE9DU8h+zqpwLuwDhyPykPFAA W+vePoWx4I6NZTyISh2mYxlCHwnuqMfsfR7TmNAgGCnnIf9bOdUq2j/zaZIo5aXf 7DpmTBXdyyZRSULi/mqBFmvToaCtiuCZsVstJLAczAeXimE1IRawxoWDSh+gy7qN JzZ73x+l6uCg2RP8iL49Z347totVHcSSeNr+0Fps6Z7M31A98T0VXGBUIPKKAVW1 9vcx7yjgN/lM0dPHUyygY9ge/Wc5Vg== =//17 -----END PGP SIGNATURE----- --kQ24buBBC3bcmINb--