fsfile_ReadInfoNoLen related fixes
One of the fixes in PipeFS 0.25 was to fix the fsfile_ReadInfo
operation
to block until the pipe is no longer open for write (instead of failing
with a "file not found" error, as it had done previously). This fix had
some knock-ons for FileSwitch, since the contemporary version (2.89)
only made use of fsfile_ReadInfo
. E.g.
trying to open a pipe for read while it's open for write would block due
to TopPath_DoBusinessToPath
using fsfile_ReadInfo
when FileSwitch is checking whether the file exists. This specific issue
was fixed in FileSwitch 2.90 by changing some areas of FileSwitch to use
fsfile_ReadInfoNoLen
instead.
Further testing has revealed a few more areas which are making unnecessary use of fsfile_ReadInfo and have the potential to break programs. Specifically, with FileSwitch 2.90
& PipeFS 0.25, programs which use GCC's UnixLib will get stuck if they
try to open a PipeFS file for write while running in a taskwindow. E.g.
the call to GNU.gawk in Env.!Common. This happens because after opening
the file, UnixLib attempts to set its attributes using OS_File 4, which
in turn causes FileSwitch to attempt to examine the file using
fsfile_ReadInfo
.
This MR fixes that above issue and a few other potential issues by changing several more areas of FileSwitch to use fsfile_ReadInfoNoLen
where possible:
- OS_File (most operations)
- OS_FSControl (
CanonicalisePathEntry
&RenameEntry
) andChangeDirectory
helper routine TopPath_DoBusinessForDirectoryRead