From owner-freebsd-hackers Mon Aug 27 16:27:50 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail3.mx.voyager.net (mail3.mx.voyager.net [216.93.66.202]) by hub.freebsd.org (Postfix) with ESMTP id 584C337B401 for ; Mon, 27 Aug 2001 16:27:48 -0700 (PDT) (envelope-from mhagerty@voyager.net) Received: from thunderbird.voyager.net (216-93-124-123.mdmmi.voyager.net [216.93.124.123]) by mail3.mx.voyager.net (8.11.6/8.10.2) with ESMTP id f7RNRlk04541 for ; Mon, 27 Aug 2001 19:27:47 -0400 (EDT) Message-Id: <5.1.0.14.2.20010827185351.01ba3aa8@pop.voyager.net> X-Sender: mhagerty@pop.voyager.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 27 Aug 2001 19:27:54 -0400 To: freebsd-hackers@freebsd.org From: Matthew Hagerty Subject: To determine if a file has grown? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Greetings, Is there a fast and/or efficient way to determine if a file size has changed without reopening the file every time? I'm writing a program that needs to open a file and watch it to see when data gets written to the file (from an external source or another part of the same program), then read the data to process it. I was looking at stat() but I've read that it is a high overhead function. Any insight would be greatly appreciated. Thanks, Matthew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message