1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-26 16:40:29 +01:00

42465: Pass up error status from readoutput().

This improves the consistency of error reporting from $(...) constructs.
This commit is contained in:
Stephane Chazelas 2018-03-14 14:42:48 +00:00 committed by Peter Stephenson
parent 7fd8e380bf
commit 1219eae829
3 changed files with 21 additions and 4 deletions

View file

@ -197,8 +197,9 @@ get_contents(char *fname)
val = NULL;
if ((fd = open(fname, O_RDONLY | O_NOCTTY)) >= 0) {
LinkList ll;
int readerror;
if ((ll = readoutput(fd, 1)))
if ((ll = readoutput(fd, 1, &readerror)))
val = peekfirst(ll);
}
#endif /* USE_MMAP */