diff options
author | jilles <jilles@FreeBSD.org> | 2012-12-12 22:01:10 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-12-12 22:01:10 +0000 |
commit | e5dd01ef24d5055696b9f61ddc0ad5e9dd3e6884 (patch) | |
tree | 62b574be073036de48cb7bc28e7e4aa2b57e010d /bin/sh/output.h | |
parent | bde43ee183f5f6d6eeb4949510346a87bf3cb414 (diff) | |
download | FreeBSD-src-e5dd01ef24d5055696b9f61ddc0ad5e9dd3e6884.zip FreeBSD-src-e5dd01ef24d5055696b9f61ddc0ad5e9dd3e6884.tar.gz |
sh: Detect and flag write errors on stdout in builtins.
If there is a write error on stdout, a message will be printed (to stderr)
and the exit status will be changed to 2 if it would have been 0 or 1.
PR: bin/158206
Diffstat (limited to 'bin/sh/output.h')
-rw-r--r-- | bin/sh/output.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/output.h b/bin/sh/output.h index 5e3b048..51974d8 100644 --- a/bin/sh/output.h +++ b/bin/sh/output.h @@ -66,6 +66,8 @@ void emptyoutbuf(struct output *); void flushall(void); void flushout(struct output *); void freestdout(void); +int outiserror(struct output *); +void outclearerror(struct output *); void outfmt(struct output *, const char *, ...) __printflike(2, 3); void out1fmt(const char *, ...) __printflike(1, 2); void out2fmt_flush(const char *, ...) __printflike(1, 2); |