From 5b94e50e9a2d4249803cf2d0b4936ec92e4e3761 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 26 Mar 2001 19:36:27 +0000 Subject: Treat mmap() error as fatal too, i.e. do exit(1) instead of return --- usr.bin/tail/forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/tail') diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index f63b410..023f941 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -290,7 +290,7 @@ rlines(fp, off, sbp) if ((start = mmap(NULL, (size_t)size, PROT_READ, MAP_SHARED, fileno(fp), (off_t)0)) == MAP_FAILED) { ierr(); - return; + exit(1); } /* Last char is special, ignore whether newline or not. */ -- cgit v1.1