From: Paul Eggert Date: Sat, 4 Dec 2004 07:02:35 +0000 (+0000) Subject: (tail_file): Set errnum to -1 if the initial "tail" failed. X-Git-Tag: v5.3.0~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd9d7fd2bdb870dd860a3d7d371cf7482dedf5ac;p=thirdparty%2Fcoreutils.git (tail_file): Set errnum to -1 if the initial "tail" failed. --- diff --git a/src/tail.c b/src/tail.c index fba74ecc3c..f09fbd6173 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1317,7 +1317,7 @@ tail_file (struct File_spec *f, uintmax_t n_units) call made the window big enough to exercise the problem. */ sleep (1); #endif - f->errnum = 0; + f->errnum = ok - 1; if (fstat (fd, &stats) < 0) { ok = false;