-/* $NetBSD: progress.c,v 1.22 2020/04/25 11:12:39 simonb Exp $ */
+/* $NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.22 2020/04/25 11:12:39 simonb Exp $");
+__RCSID("$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $");
#endif /* not lint */
#include <sys/types.h>
for (off = 0; nr; nr -= nw, off += nw, bytes += nw)
if ((nw = write(outpipe[1], fb_buf + off,
(size_t) nr)) < 0) {
+ if (errno == EINTR) {
+ nw = 0;
+ continue;
+ }
progressmeter(1);
err(1, "writing %u bytes to output pipe",
(unsigned) nr);