diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-13 16:48:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-11-13 16:48:49 +0000 |
commit | 721331485113010a50f394bb958daaea53fc65a9 (patch) | |
tree | 4769c5859ad1d17a6fa74cbe0d39073984ea3b04 /usr.bin/less/os.c | |
parent | 1302fca7067bc48a64297069a4d2885ede31d707 (diff) |
Add a flag argument to flush() to stop it calling quit() on error, then
use this from quit() to stop less blowing up the stack looping through
quit()/flush() if stderr is closed (for example "less /missing
2</dev/null"). ok millert
Diffstat (limited to 'usr.bin/less/os.c')
-rw-r--r-- | usr.bin/less/os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/less/os.c b/usr.bin/less/os.c index 3bbc75e8559..e10135c2813 100644 --- a/usr.bin/less/os.c +++ b/usr.bin/less/os.c @@ -37,7 +37,7 @@ iread(int fd, unsigned char *buf, unsigned int len) int n; start: - flush(); + flush(0); n = read(fd, buf, len); if (n < 0) { /* |