Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Use an explicit body for a "until not EINTR" loop.



details:   https://anonhg.NetBSD.org/src/rev/690e4fa4e2c7
branches:  trunk
changeset: 338742:690e4fa4e2c7
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 06 15:22:58 2015 +0000

description:
Use an explicit body for a "until not EINTR" loop.

diffstat:

 bin/sh/expand.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r d5da087660dd -r 690e4fa4e2c7 bin/sh/expand.c
--- a/bin/sh/expand.c   Sat Jun 06 15:16:28 2015 +0000
+++ b/bin/sh/expand.c   Sat Jun 06 15:22:58 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expand.c,v 1.91 2014/01/20 14:05:51 roy Exp $  */
+/*     $NetBSD: expand.c,v 1.92 2015/06/06 15:22:58 joerg Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c   8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.91 2014/01/20 14:05:51 roy Exp $");
+__RCSID("$NetBSD: expand.c,v 1.92 2015/06/06 15:22:58 joerg Exp $");
 #endif
 #endif /* not lint */
 
@@ -451,7 +451,8 @@
                if (--in.nleft < 0) {
                        if (in.fd < 0)
                                break;
-                       while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR);
+                       while ((i = read(in.fd, buf, sizeof buf)) < 0 && errno == EINTR)
+                               continue;
                        TRACE(("expbackq: read returns %d\n", i));
                        if (i <= 0)
                                break;



Home | Main Index | Thread Index | Old Index