summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2001-06-01 03:56:50 +0000
committerPaul Smith <psmith@gnu.org>2001-06-01 03:56:50 +0000
commitce2c6eadf1a7f49465a51a4377f2705ce637715c (patch)
tree4e3fe9abeb5b51cd37f36f139e71ee9c79527374 /function.c
parent5d582d4ba06495a95854c45828399f7edfe51a50 (diff)
downloadgunmake-ce2c6eadf1a7f49465a51a4377f2705ce637715c.tar.gz
Fix for EINTR problems when using jobserver.
New translation files. Fix for @+ inside define macros being applied too widely. Various other bug fixes.
Diffstat (limited to 'function.c')
-rw-r--r--function.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/function.c b/function.c
index 295d84b..2c049ce 100644
--- a/function.c
+++ b/function.c
@@ -1435,8 +1435,7 @@ func_shell (o, argv, funcname)
buffer = (char *) xmalloc (maxlen + 1);
/* Read from the pipe until it gets EOF. */
- i = 0;
- do
+ for (i = 0; ; i += cc)
{
if (i == maxlen)
{
@@ -1444,12 +1443,10 @@ func_shell (o, argv, funcname)
buffer = (char *) xrealloc (buffer, maxlen + 1);
}
- errno = 0;
cc = read (pipedes[0], &buffer[i], maxlen - i);
- if (cc > 0)
- i += cc;
+ if (cc <= 0)
+ break;
}
- while (cc > 0 || EINTR_SET);
buffer[i] = '\0';
/* Close the read side of the pipe. */