From 8e43729547b57ab15842dab23215336a353b2ded Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Fri, 7 Sep 2018 10:34:13 +0200 Subject: eval: Report I/O error on stdout ENOSPC as a result of an echo builting failing gives no diagnostic. Just as other shells, dash sets $? to 1, but aside from terminating the script, this does not inform the user what the problem is: zsh: % echo foo > /dev/full echo: write error: no space left on device bash: $ echo foo > /dev/full bash: echo: write error: No space left on device dash: $ echo foo > /dev/full [nothing] Print an error to stderr like the other shells. Suggested by Roger Leigh. Signed-off-by: Gerrit Pape [reworded the patch description with information from the bug] Signed-off-by: Andrej Shadura Bug-Debian: http://bugs.debian.org/690473 Signed-off-by: Herbert Xu --- src/eval.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/eval.c b/src/eval.c index 6185db4..546ee1b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -952,6 +952,8 @@ evalbltin(const struct builtincmd *cmd, int argc, char **argv, int flags) else status = (*cmd->builtin)(argc, argv); flushall(); + if (outerr(out1)) + warnx("%s: I/O error", commandname); status |= outerr(out1); exitstatus = status; cmddone: -- cgit 1.4.1 c9f799126d15d89&follow=1'>diff
Commit message (Expand)Author
2024-09-24Add photos from September 12June McEnroe
2024-09-24Add photos from September 7June McEnroe
2024-09-24Allow not having descriptionsJune McEnroe
2024-09-23Automatically select the last used lens for a bodyJune McEnroe
2024-09-19Add photos from September 5June McEnroe
2024-09-15Add some more film stocks to the listJune McEnroe
2024-09-13Add photos from September 2June McEnroe
2024-09-13Add Fomapan 200 to films listJune McEnroe
2024-09-10Add August 29 picnic photosJune McEnroe
2024-09-08Apply some bold to trips renderingJune McEnroe
2024-09-08Render trips hopefully more efficientlyJune McEnroe
2024-09-08Allow removing bodies and lensesJune McEnroe
2024-09-08Limit body width so it looks less silly on desktopJune McEnroe
2024-09-07Handle no film being loadedJune McEnroe
2024-09-07Fancy up the text a littleJune McEnroe