From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71477: 30.0.50; Lock files are not deleted on Windows 98 Date: Tue, 11 Jun 2024 11:28:59 +0300 Message-ID: <868qzb7uic.fsf@gnu.org> References: <87r0d4bzut.fsf.ref@yahoo.com> <87r0d4bzut.fsf@yahoo.com> <867cew8zgh.fsf@gnu.org> <87ikygb6hp.fsf@yahoo.com> <86h6e06kn5.fsf@gnu.org> <87bk47c4cd.fsf@yahoo.com> <86bk477vzx.fsf@gnu.org> <871q53c2ur.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4152"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71477@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 11 22:26:01 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 1sH848-0000mR-6g for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jun 2024 22:26:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sH83Q-0007gi-Fd; Tue, 11 Jun 2024 16:25:16 -0400 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 1sH83H-0007dp-3U for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2024 16:25:07 -0400 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 1sH83G-0003Tv-OD for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2024 16:25:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sH83F-0002nA-3S for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2024 16:25:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Jun 2024 20:25:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71477 X-GNU-PR-Package: emacs Original-Received: via spool by 71477-submit@debbugs.gnu.org id=B71477.171813745510561 (code B ref 71477); Tue, 11 Jun 2024 20:25:05 +0000 Original-Received: (at 71477) by debbugs.gnu.org; 11 Jun 2024 20:24:15 +0000 Original-Received: from localhost ([127.0.0.1]:36385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH82Q-0002kA-R5 for submit@debbugs.gnu.org; Tue, 11 Jun 2024 16:24:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH82N-0002i3-NZ for 71477@debbugs.gnu.org; Tue, 11 Jun 2024 16:24:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGwsW-0004FT-2W; Tue, 11 Jun 2024 04:29:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EEEEzTSQR4/2cqZiR4axn704a7L0HoRG6RwYU4bx+fU=; b=Dw1V9j4HzXxf YI2xOVLsba4RhCr7WVHeHQl2tS3nRkvu7MKGimIhjLN517r1x43iNgcnV6lQDG62JrZMzXOOFTlk4 ydimVVPmYjMHA4Y4D/31jABb/ctvwRohVyQ4cJgiohoJzW5eOHml/BEVfWBeiOl2JE/hwU5e1OB1v ZKzqfBaF+bRDUFwzpluhU7gPvBE/fr82ObUEvlgD+ouuhdF7Mh8nP+L1L4bMZ79DgMT2InJyEL3bb A99W2bnwyHGm0gbC9cw/yKFeDJ8y5zcWkToK+rlzlKDz2Hr9i1TKHkQAyW4cjWtLOpbJ+oR7u4B9/ v9puHb0iN+xmSy1QDtlMQg==; In-Reply-To: <871q53c2ur.fsf@yahoo.com> (message from Po Lu on Tue, 11 Jun 2024 16:15:08 +0800) 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:287118 Archived-At: > From: Po Lu > Cc: 71477@debbugs.gnu.org > Date: Tue, 11 Jun 2024 16:15:08 +0800 > > Eli Zaretskii writes: > > >> From: Po Lu > >> Cc: 71477@debbugs.gnu.org > >> Date: Tue, 11 Jun 2024 15:42:58 +0800 > >> > >> Eli Zaretskii writes: > >> > >> > Sorry, I don't understand the problems with negative PID values. > >> > Where exactly in the code of filelock.c it gets in the way? > >> > >> Here: > >> > >> /* The PID is everything from the last '.' to the ':' or equivalent. */ > >> if (! c_isdigit (dot[1])) <-------------- > >> return EINVAL; > >> errno = 0; > >> > >> The first character of the number after the period is `-' on Windows 98. > > > > But that is easy to fix without any significant effect on the rest of > > the code. For example: > > > > if (! (c_isdigit (dot[1]) > > || (dot[1] == '-' && c_isdigit (dot[2])))) > > return EINVAL; > > > > Are there any problems with the above fix? > > No, but won't leaving the format of the lock file string inconsistent > with Unix create difficulties elsewhere, as, for example, on a Samba > share to which Unix systems are also connected? What inconsistencies, specifically? The only possible issue I see with allowing a negative PID is that the code checks for "pid > 0" or "pid < 0" somewhere; if that is the case, we should replace those with comparisons with -1 instead. Can you test the above on Windows 9X when you have a chance? Then we could install it. > P.S. is debbugs.gnu.org offline or some such? It has connectivity problems. It was already reported.