mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-06-04 21:38:25 +02:00
util: retry posix_fallocate() if it fails
We block SIGALRM since d4bf8840a4 so any
remaining EINTR is something we should probably retry with.
This commit is contained in:
parent
a3c801097d
commit
19c949a46b
1 changed files with 3 additions and 2 deletions
|
|
@ -68,8 +68,9 @@ memfile_new(const char *data, size_t sz) {
|
|||
fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK);
|
||||
|
||||
int rc;
|
||||
with_signals_blocked(SIGALRM)
|
||||
rc = posix_fallocate(fd, 0, sz);
|
||||
with_signals_blocked(SIGALRM) {
|
||||
rc = SYSCALL(posix_fallocate(fd, 0, sz));
|
||||
}
|
||||
if (rc < 0)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue