io: ignore failed zero length posixed mapped_files
This commit is contained in:
parent
cc001c4788
commit
ddfb765110
@ -29,7 +29,13 @@ using util::detail::posix::mapped_file;
|
|||||||
mapped_file::mapped_file (const char *_path, int fflags, int mflags):
|
mapped_file::mapped_file (const char *_path, int fflags, int mflags):
|
||||||
m_fd (_path, fflags)
|
m_fd (_path, fflags)
|
||||||
{
|
{
|
||||||
load_fd (mflags);
|
try {
|
||||||
|
load_fd (mflags);
|
||||||
|
} catch (const errno_error &e) {
|
||||||
|
// ignore zero length mapping error
|
||||||
|
if (e.code () == EINVAL && m_size == 0)
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user