Re: [ANNOUNCE] Git v2.32.0-rc3 - t5300 Still Broken on NonStop ia64/x86
- From
René Scharfe <l.s.r@web.de>
- Date
- Jun 5, 2021, 07:04 UTC
- Message-ID
- <9b663ba3-6680-0d9a-4910-502cb2abac6b@web.de>
- In-Reply-To
- <xmqqk0na2yyc.fsf@gitster.g>
Am 04.06.21 um 03:36 schrieb Junio C Hamano:
Show 22 quoted lines
> ---
>
> write-or-die.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git i/write-or-die.c w/write-or-die.c
> index eab8c8d0b9..534b2f5cba 100644
> --- i/write-or-die.c
> +++ w/write-or-die.c
> @@ -57,7 +57,11 @@ void fprintf_or_die(FILE *f, const char *fmt, ...)
>
> void fsync_or_die(int fd, const char *msg)
> {
> - if (fsync(fd) < 0) {
> + int status;
> +
> + while ((status = fsync(fd)) < 0 && errno == EINTR)
> + ; /* try again */
> + if (status < 0) {
> die_errno("fsync error on '%s'", msg);
> }
> }The function body can be written like this:
while (fsync(fd) < 0) {
if (errno != EINTR)
die_errno("fsync error on '%s'", msg);
}I find it easier to read because it has less syntax elements and is shorter. Bikeshedding, of course. :-/
René