Closed kalikin closed 2 years ago
Hi. I just tried a small example on AIX and found that shared_memory_object::truncate() always fails:
shared_memory_object shdmem(open_or_create, "test", read_write); shdmem.truncate(1024);
It looks like truncate() actually makes these two calls: posix_fallocate and ftruncate. And posix_fallocate, which was introduced in #106, returns ENODEV error code, which means "The fd parameter does not refer to a regular file", according to docs.
posix_fallocate
ftruncate
ENODEV
Thanks for the report. Let me know if the commit fixes the problem in AIX, I have no access to that OS
Hi. I just tried a small example on AIX and found that shared_memory_object::truncate() always fails:
It looks like truncate() actually makes these two calls:
posix_fallocate
andftruncate
. Andposix_fallocate
, which was introduced in #106, returnsENODEV
error code, which means "The fd parameter does not refer to a regular file", according to docs.