Fix ReadWithSizeAndUnlink on systems that have syscall based mmap

This commit is contained in:
Kovid Goyal
2023-02-28 13:44:09 +05:30
parent 4d3ce47813
commit ce12fd3515
2 changed files with 13 additions and 9 deletions

View File

@@ -118,6 +118,7 @@ func read_till_buf_full(f *os.File, buf []byte) ([]byte, error) {
if len(p) == 0 && errors.Is(err, io.EOF) {
err = nil
}
err = fmt.Errorf("Failed to read from SHM file with error: %w", err)
return buf[:len(buf)-len(p)], err
}
}