Closed cmorty closed 3 years ago
A correctly created managed file can't have zero size. Code is waiting the create process to initialize the managed file (in case of error, file will be truncated to size 1). Which is your use case?
Thanks for the report. The implementation will add deadlock detection code with configurable macros BOOST_INTERPROCESS_MANAGED_OPEN_OR_CREATE_INITIALIZE_MAX_TRIES/BOOST_INTERPROCESS_MANAGED_OPEN_OR_CREATE_INITIALIZE_TIMEOUT_SEC to handle those situations, as there is no reliable way to detect the other process creating the resource is dead or not.
Calling
managed_mapped_file(bip::open_only,filename)
on a file with size 0 results in a in infinite loop.