Open daubmannus opened 12 hours ago
If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
Windows Version
Microsoft Windows [Version 10.0.19045.5011]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.153.1-2
Distro Version
Ubuntu 22.04.5
Other Software
No response
Repro Steps
The behavior described in the report is observed only on WSL's 9P mounts of Windows disks.
sudo mkdir -p /mnt/c/test
cd /mnt/c/test
touch 1 2
run the script
output: some random number
cat .list
output:
by default, pathname expansion omits files whose names start with
.
unless the.
is explicitly matched by the pattern. Therefore, in the above code,.tmp
is not expected to appear in the expansion of*
, regardless of the relative timing of its creation.in the example command, pathname expansion is expected to be performed, once, before any iterations of the loop body are performed.
it is not expected for pathname expansion to yield duplicate pathnames, because that is not consistent with the Bash or POSIX specifications.
The appearance of duplicate lines in
.list
indicates that at least one of the previous two expectations is violated. This would be a bug.see the discussion here: https://stackoverflow.com/a/79146114/10244657
Expected Behavior
Script runs forever. File
.list
is populated with an exact list of files on each iteration of the loop.Actual Behavior
On WSL's 9P mounts of Windows' disks script stops after some random number of iterations, outputs this number. File
.list
contains the name of one of the files in the current directory twice.Diagnostic Logs
WslLogs-2024-11-01_06-25-00.zip