[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84243] [Ruby trunk Feature#14177] PATCH: File::Stat#dev on Windows
From:
kubo@...
Date:
2017-12-13 23:21:45 UTC
List:
ruby-core #84243
Issue #14177 has been reported by kubo (Takehiro Kubo).
----------------------------------------
Feature #14177: PATCH: File::Stat#dev on Windows
https://bugs.ruby-lang.org/issues/14177
* Author: kubo (Takehiro Kubo)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Two files are identical when pairs of File::Stat#dev and File::Stat#ino
are same on unix. However when a volume (disk partition) is mounted on
a directory they may not identical even when the pairs are same on Windows
because File::Stat#dev is based on drive letters.
I did the following on Windows on vmware.
1. attach a new virtual disk to the VM.
2. create two NTFS volumes in the disk and mount them to c:\volume1 and c:\volume2 respectively.
3. create two files in c:\volume1 and c:\volume2 respectively.
4. File.stat(filename).dev returns 2 ('C' - 'A') for both files.
5. File.stat(filename).ino returns 281474976710691 for both files.
The inode number of firstly created file in NTFS seems same.
6. The pairs of #dev and #ino are same even though the files aren't identical.
The attached patch do the followging:
1. change _dev_t to 64-bit rb_dev_t in struct stati128.
2. use FILE_ID_INFO.VolumeSerialNumber (64-bit)
or BY_HANDLE_FILE_INFORMATION.dwVolumeSerialNumber (32-bit)
as File::Stat#dev.
3. use path_drive() only when open_special() fails.
4. delete code which become unnecessary by above changes.
However, I think, there are pros and cons of the patch.
Pros.
* Two files are identical when pairs of File::Stat#dev and File::Stat#ino
are same as on unix
Cons.
* File::Stat#dev returns too large number (32-bit or 64-bit integer).
* In manual File::Stat#dev returns an integer representing the device.
However this patch makes it return volume serial number, whose
concept is a bit difference from device.
---Files--------------------------------
file_stat_dev.patch (2.86 KB)
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>