Merge branch 'jc/fsync-can-fail-with-eintr'
Last minute portability fix. * jc/fsync-can-fail-with-eintr: fsync(): be prepared to see EINTR
This commit is contained in:
commit
0481af98ba
@ -57,8 +57,9 @@ void fprintf_or_die(FILE *f, const char *fmt, ...)
|
|||||||
|
|
||||||
void fsync_or_die(int fd, const char *msg)
|
void fsync_or_die(int fd, const char *msg)
|
||||||
{
|
{
|
||||||
if (fsync(fd) < 0) {
|
while (fsync(fd) < 0) {
|
||||||
die_errno("fsync error on '%s'", msg);
|
if (errno != EINTR)
|
||||||
|
die_errno("fsync error on '%s'", msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user