diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2019-06-09 11:21:29 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2019-06-09 11:21:29 +0000 |
commit | 2fe0bee4bbd4c717cd76d399dc59189511856d88 (patch) | |
tree | b0677d9f74ca690f9da703c5d1d9a7804249e702 /usr.bin | |
parent | 1fe65d054b86c9246fde7af43cd4baab4a119fd1 (diff) | |
download | src-test2-2fe0bee4bbd4c717cd76d399dc59189511856d88.tar.gz src-test2-2fe0bee4bbd4c717cd76d399dc59189511856d88.zip |
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tail/tail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 9cab33cef76f..5985fcf51e80 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -212,7 +212,8 @@ main(int argc, char *argv[]) file->file_name = strdup(fn); if (! file->file_name) errx(1, "Couldn't malloc space for file name."); - if ((file->fp = fileargs_fopen(fa, file->file_name, "r")) == NULL || + file->fp = fileargs_fopen(fa, file->file_name, "r"); + if (file->fp == NULL || fstat(fileno(file->fp), &file->st)) { if (file->fp != NULL) { fclose(file->fp); |