GNU bug report logs - #71477
30.0.50; Lock files are not deleted on Windows 98

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Mon, 10 Jun 2024 16:41:04 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 71477 <at> debbugs.gnu.org
Subject: bug#71477: 30.0.50; Lock files are not deleted on Windows 98
Date: Tue, 11 Jun 2024 10:56:50 +0300
> From: Po Lu <luangruo <at> yahoo.com>
> Cc: 71477 <at> debbugs.gnu.org
> Date: Tue, 11 Jun 2024 15:42:58 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> 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.




This bug report was last modified 1 year and 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.