Fix: handle EINTR return value for bt_posix_fallocate
[babeltrace.git] / formats / ctf / ir / event-fields.c
index aa7475d0952722512636af701237ba68a361a81c..3358ff0ed0f68af8055b7ab6c8a8436b0b3b0c33 100644 (file)
@@ -2171,9 +2171,13 @@ int increase_packet_size(struct ctf_stream_pos *pos)
        }
 
        pos->packet_size += PACKET_LEN_INCREMENT;
-       ret = bt_posix_fallocate(pos->fd, pos->mmap_offset,
-               pos->packet_size / CHAR_BIT);
+       do {
+               ret = bt_posix_fallocate(pos->fd, pos->mmap_offset,
+                       pos->packet_size / CHAR_BIT);
+       } while (ret == EINTR);
        if (ret) {
+               errno = EINTR;
+               ret = -1;
                goto end;
        }
 
This page took 0.025093 seconds and 4 git commands to generate.