Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Jan 16, 2024
1 parent 18aca47 commit e65f596
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion messaging/msgq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size, bool preall
}

if (preallocate && (std::getenv("MSGQ_PREALLOCATE") != nullptr)) {
rc = fallocate(fd, 0, 0, size + sizeof(msgq_header_t));
do {
rc = fallocate(fd, 0, 0, size + sizeof(msgq_header_t));
} while (rc == EINTR);
if (rc < 0){
close(fd);
return -1;
Expand Down

0 comments on commit e65f596

Please sign in to comment.