From owner-freebsd-hackers Sun Nov 7 0:47:23 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 65EA914BD3 for ; Sun, 7 Nov 1999 00:47:20 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com (p24-dn03kiryunisiki.gunma.ocn.ne.jp [210.232.224.153]) by peach.ocn.ne.jp (8.9.1a/OCN) with ESMTP id RAA29395; Sun, 7 Nov 1999 17:47:01 +0900 (JST) Message-ID: <38253C03.A7036A91@newsguy.com> Date: Sun, 07 Nov 1999 17:44:51 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,pt-BR,ja MIME-Version: 1.0 To: Jos Backus Cc: Sheldon Hearn , Jos Backus , freebsd-hackers@FreeBSD.ORG Subject: Re: ftpd feature: lock file being stored References: <19991105111518.A2328@hal.mpn.cp.philips.com> <7173.941797101@axl.noc.iafrica.com> <19991105113929.B2328@hal.mpn.cp.philips.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jos Backus wrote: > > Scanning the directory for new files, as the aforementioned script does. If > you have more than one script doing this at the same time, both may conclude > that a given file is ``available'' and try to act upon it. Inevitably, one of > those scripts will fail. Hence my solution. But maybe I don't quite understand > the problem :-) > > (Yes, I know you will say, "Don't run more than one script at a time then.". > But whether this is possible really depends on the application and moreover > seems to be an unecessary restriction.) Actually, use fstat to check against ftpd, and lockf between the scripts. :-) -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org What y'all wanna do? Wanna be hackers? Code crackers? Slackers Wastin' time with all the chatroom yakkers? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message