From owner-cvs-src@FreeBSD.ORG Sat Oct 21 18:05:07 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9865A16A681; Sat, 21 Oct 2006 18:05:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56F3D43D46; Sat, 21 Oct 2006 18:05:07 +0000 (GMT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k9LI57Qe041139; Sat, 21 Oct 2006 18:05:07 GMT (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k9LI57QZ041138; Sat, 21 Oct 2006 18:05:07 GMT (envelope-from marcel) Message-Id: <200610211805.k9LI57QZ041138@repoman.freebsd.org> From: Marcel Moolenaar Date: Sat, 21 Oct 2006 18:05:07 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/usr.bin/tail forward.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2006 18:05:07 -0000 marcel 2006-10-21 18:05:06 UTC FreeBSD src repository Modified files: usr.bin/tail forward.c Log: Better handle the -F case: o When stat(2) fails (i.e. the file has been moved) there's no new file with the same name yet, so keep showing the file that's open. This yields the same behaviour as -f, for which we don't stat(2). o When a new file with the same name has been created (i.e stat(2) succeeds but the inode or device numbers differ from the opened file), show any new lines in the opened file (i.e. the old or rotated file) before reopening the new file. These changes fix the observed behaviour that tail(1) doesn't show the very last lines of the rotated (log) files. PR: bin/101979 Tested by: Jos Backus MFC after: 2 months Revision Changes Path 1.41 +5 -7 src/usr.bin/tail/forward.c