Re: Problem with boot-time on Cygwin

2024-05-04 Thread Ken Brown
On 5/4/2024 10:36 AM, Bruno Haible wrote: I'm committing this workaround. Thanks! I've tested on Cygwin 3.5.3 and on the latest test release, and I can confirm that the problem is fixed. Ken

Re: Problem with boot-time on Cygwin

2024-05-04 Thread Bruno Haible
Ken Brown wrote: > I don't know what's going on, but it seems clear that pagefile.sys can't > be used reliably on Cygwin to get a boot time. I wonder if > get_boot_time should simply bail out on Cygwin and always give a boot > time of 0. Or do you have a better idea? I'm committing this worka

Re: Problem with boot-time on Cygwin

2024-05-02 Thread Bruno Haible
Hi Ken, > $ ls -l /proc/cygdrive/c/pagefile.sys/ > ls: cannot open directory '/proc/cygdrive/c/pagefile.sys/': Not a directory > > $ ls -ld /proc/cygdrive/c/pagefile.sys/ > drwxr-x--- 17664 Unknown+User Unknown+Group 0 1600-12-31 19:11 > /proc/cygdrive/c/pagefile.sys// > > Notice that the file

Re: Problem with boot-time on Cygwin

2024-05-02 Thread Ken Brown
Hi Bruno, Unfortunately, fixing the cygdrive bug has made things worse from the point of view of emacs, at least on my system. Namely, I can't even build emacs. The build produces warnings like the following and ultimately fails: Warning (unlock-file): Unlocking file: Invalid argument, /h

Re: Problem with boot-time on Cygwin

2024-05-02 Thread Bruno Haible
Ken Brown wrote: > I don't know anything about Docker containers or jails, but it's my > understanding that /proc/cygdrive always exists. Thanks for the confirmation. Bruno

Re: Problem with boot-time on Cygwin

2024-05-02 Thread Ken Brown
Hi Bruno, On 5/1/2024 6:52 PM, Bruno Haible wrote: I did not know about /proc/cygdrive; thanks for teaching us. I guess it can be assumed that /proc/cygdrive exists, because unlike in Linux, there are no Docker containers and unlike in FreeBSD, there are no jails? I don't know anything about D

Re: Problem with boot-time on Cygwin

2024-05-01 Thread Bruno Haible
Hi Ken, Thanks for the report. > > First, there is a comment > > saying that /var/run/utmp is empty on Cygwin. This is not true, at > > least on my system. I'm running Cygwin 3.5.3, the latest stable > > release. In my Cygwin 3.5.3 installation, /var/run/utmp is empty. But anyway, since you

Re: Problem with boot-time on Cygwin

2024-05-01 Thread Ken Brown
On 5/1/2024 4:44 PM, Ken Brown wrote: An Emacs bug report (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70415) has led me to look at gnulib's boot-time, and I discovered a problem.  I haven't studied the code in detail, but I looked at get_windows_boot_time in boot-time-aux.h and found two mi

Problem with boot-time on Cygwin

2024-05-01 Thread Ken Brown
An Emacs bug report (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70415) has led me to look at gnulib's boot-time, and I discovered a problem. I haven't studied the code in detail, but I looked at get_windows_boot_time in boot-time-aux.h and found two mistakes. First, there is a comment say