Skip to content
Commit dd00220b authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Simon Ser
Browse files

cursor/os-compatibility: handle EINTR gracefully



If os_resize_anonymous_file() called from os_create_anonymous_file()
fails with EINTR (Interrupted system call), then the buffer allocation
fails.

To avoid that, retry posix_fallocate() on EINTR.

However, in the presence of an alarm, the interrupt may trigger
repeatedly and prevent a large posix_fallocate() to ever complete
successfully, so we need to first block SIGALRM to prevent this.

Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
parent 07c8f415
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment