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 10:56:50 +0300 Message-ID: <86bk477vzx.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2747"; 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:25:50 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 1sH83x-0000SF-Gg for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 11 Jun 2024 22:25:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sH83Q-0007gS-4Q; 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-0007e3-Jz 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 1sH83H-0003UK-81 for bug-gnu-emacs@gnu.org; Tue, 11 Jun 2024 16:25:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sH83F-0002nH-IU 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.171813745510567 (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]:36389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sH82R-0002kI-63 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 1sH82O-0002i3-8m 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 1sGwNY-0005ss-61; Tue, 11 Jun 2024 03:57: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=QgrnvCVJrc6rXmNhI3QQ0chzAn/7iha78laOut5qHKY=; b=NmSxtiaWhjX2 8FsIYHHwljj7qB1Bu3hwQEJJ9Q5KdN8ISBkgzPdsSl8E0kD+QJm+/zX8SrFmazyMVR+qtx19U8+7d w9JvOJOmPTwGGpHalwwlfCGx6ZL40FwbqJ6f/nM7wJHzJch1oZRSw8iwofMu8VSjh+n11y5SDVWUH IjdNu260BlzvM+GXVesl+f9Gkt3mG/06psBtfkkTtfcOM0XWkclbsyumu0MTnL4oJZeArVDTKAEux KDABJ415T3hADGrUER5MQpQYLJN7bN2cjDc6GQg74qIkVSR4LZWguYR1p0Vh+EGFVBGr8TCDCthL4 ia3Veype7FJUev6V2kBjqQ==; In-Reply-To: <87bk47c4cd.fsf@yahoo.com> (message from Po Lu on Tue, 11 Jun 2024 15:42:58 +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:287116 Archived-At: > 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? Please note: I don't want to make any significant changes in this area, certainly not for the benefit of Windows 9X. So if the above is not sufficient, please tell the details, and let's discuss how to solve what's left. P.S. I've for now reverted the changes you made to use unsigned values because I don't think that TRT (pid must support negative values), and this whole area of code is fragile enough for us to discuss changes before installing them.