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

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

bug#71477: 30.0.50; Lock files are not deleted on Windows 98


From: Eli Zaretskii
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@yahoo.com>
> Cc: 71477@debbugs.gnu.org
> Date: Tue, 11 Jun 2024 15:42:58 +0800
> 
> Eli Zaretskii <eliz@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.





reply via email to

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