diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-11 15:00:06 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-11 15:00:06 +0800 |
commit | 44a94779a85f2a87cd0d552c1d272b8c05b85630 (patch) | |
tree | 77bd58bff5b3cdb3d8ad44455befb6f536750bd1 /src/eval.c | |
parent | [PARSER] Removed noexpand/length check on eofmark (diff) | |
download | dash-44a94779a85f2a87cd0d552c1d272b8c05b85630.tar.gz dash-44a94779a85f2a87cd0d552c1d272b8c05b85630.zip |
[EXPAND] Removed herefd hack
The herefd hack goes back more than a decade. it limits the amount of memory we have to allocate when expanding here-documents by writing the result out from time to time. However, it's no longer safe because the stack is used to place intermediate results too and there we certainly don't want to write them out should we be short on memory. In any case, with today's computers we can afford to keep the entire result in memory and write them out at the end.
Diffstat (limited to '')
-rw-r--r-- | src/eval.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c index 17b558d..a8feaa0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -577,8 +577,6 @@ evalpipe(union node *n, int flags) void evalbackcmd(union node *n, struct backcmd *result) { - int saveherefd; - result->fd = -1; result->buf = NULL; result->nleft = 0; @@ -587,9 +585,6 @@ evalbackcmd(union node *n, struct backcmd *result) goto out; } - saveherefd = herefd; - herefd = -1; - #ifdef notyet /* * For now we disable executing builtins in the same @@ -636,7 +631,6 @@ evalbackcmd(union node *n, struct backcmd *result) result->fd = pip[0]; result->jp = jp; } - herefd = saveherefd; out: TRACE(("evalbackcmd done: fd=%d buf=0x%x nleft=%d jp=0x%x\n", result->fd, result->buf, result->nleft, result->jp)); |