Re: [PATCH weston 1/2] os: Check for EINTR on posix_fallocate()
On 3/23/17 6:42 PM, Eric Engestrom wrote: On Thursday, 2017-03-23 11:59:22 -0500, Derek Foreman wrote: posix_fallocate() can return EINTR and need to be restarted - I've hit this when running weston-terminal under gdb. Signed-off-by: Derek Foreman Both patches are: Reviewed-by: Eric Engestrom Added mine and pushed: 7fecb437..5ef6bd7e master -> master Thanks, ...and now I'm looking for these in $DAYJOB codebase ^^ --- shared/os-compatibility.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c index 551f2a99..6b2f3770 100644 --- a/shared/os-compatibility.c +++ b/shared/os-compatibility.c @@ -178,7 +178,9 @@ os_create_anonymous_file(off_t size) return -1; #ifdef HAVE_POSIX_FALLOCATE - ret = posix_fallocate(fd, 0, size); + do { + ret = posix_fallocate(fd, 0, size); + } while (ret == EINTR); if (ret != 0) { close(fd); errno = ret; -- 2.11.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel -- Quentin “Sardem FF7” Glidic ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston 1/2] os: Check for EINTR on posix_fallocate()
On Thursday, 2017-03-23 11:59:22 -0500, Derek Foreman wrote: > posix_fallocate() can return EINTR and need to be restarted - I've hit > this when running weston-terminal under gdb. > > Signed-off-by: Derek Foreman Both patches are: Reviewed-by: Eric Engestrom ...and now I'm looking for these in $DAYJOB codebase ^^ > --- > shared/os-compatibility.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c > index 551f2a99..6b2f3770 100644 > --- a/shared/os-compatibility.c > +++ b/shared/os-compatibility.c > @@ -178,7 +178,9 @@ os_create_anonymous_file(off_t size) > return -1; > > #ifdef HAVE_POSIX_FALLOCATE > - ret = posix_fallocate(fd, 0, size); > + do { > + ret = posix_fallocate(fd, 0, size); > + } while (ret == EINTR); > if (ret != 0) { > close(fd); > errno = ret; > -- > 2.11.0 > ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston 1/2] os: Check for EINTR on posix_fallocate()
posix_fallocate() can return EINTR and need to be restarted - I've hit this when running weston-terminal under gdb. Signed-off-by: Derek Foreman --- shared/os-compatibility.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c index 551f2a99..6b2f3770 100644 --- a/shared/os-compatibility.c +++ b/shared/os-compatibility.c @@ -178,7 +178,9 @@ os_create_anonymous_file(off_t size) return -1; #ifdef HAVE_POSIX_FALLOCATE - ret = posix_fallocate(fd, 0, size); + do { + ret = posix_fallocate(fd, 0, size); + } while (ret == EINTR); if (ret != 0) { close(fd); errno = ret; -- 2.11.0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel