From: millert Date: Wed, 24 May 2023 14:20:33 +0000 (+0000) Subject: ksh: make $(< filename) error output include the errno string. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4fae8b7728edbfad797de65aa6679272c6937d35;p=openbsd ksh: make $(< filename) error output include the errno string. This is more consistent with how bash, zsh and ksh93 behave and makes $(< filename) more of a drop-in replacment for $(cat filename). OK kn@ florian@ --- diff --git a/bin/ksh/eval.c b/bin/ksh/eval.c index 2f22c2ee2eb..deca5843412 100644 --- a/bin/ksh/eval.c +++ b/bin/ksh/eval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.66 2020/09/13 15:39:09 tb Exp $ */ +/* $OpenBSD: eval.c,v 1.67 2023/05/24 14:20:33 millert Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -909,7 +910,7 @@ comsub(Expand *xp, char *cp) SHF_MAPHI|SHF_CLEXEC); if (shf == NULL) warningf(!Flag(FTALKING), - "%s: cannot open $(<) input", name); + "%s: %s", name, strerror(errno)); xp->split = 0; /* no waitlast() */ } else { int ofd1, pv[2];