Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/usr.bin/progress Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/fd268b650d37
branches:  netbsd-9
changeset: 964269:fd268b650d37
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 29 18:27:05 2021 +0000

description:
Pull up following revision(s) (requested by lukem in ticket #1189):

        usr.bin/progress/progress.c: revision 1.23

progress: handle EINTR in writes. PR/55914

diffstat:

 usr.bin/progress/progress.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r e4b1291bf26b -r fd268b650d37 usr.bin/progress/progress.c
--- a/usr.bin/progress/progress.c       Mon Jan 25 14:16:00 2021 +0000
+++ b/usr.bin/progress/progress.c       Fri Jan 29 18:27:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: progress.c,v 1.21 2015/01/17 10:57:51 gson Exp $ */
+/*     $NetBSD: progress.c,v 1.21.18.1 2021/01/29 18:27:05 martin Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.21 2015/01/17 10:57:51 gson Exp $");
+__RCSID("$NetBSD: progress.c,v 1.21.18.1 2021/01/29 18:27:05 martin Exp $");
 #endif                         /* not lint */
 
 #include <sys/types.h>
@@ -237,6 +237,10 @@
                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);



Home | Main Index | Thread Index | Old Index