From owner-freebsd-questions Thu Feb 3 8:33:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from overlypub.com (mail.overlypub.com [216.204.53.156]) by builder.freebsd.org (Postfix) with ESMTP id 7C63740DF for ; Thu, 3 Feb 2000 08:33:26 -0800 (PST) Received: from [10.0.0.5] (216.204.53.158) by overlypub.com with ESMTP (Eudora Internet Mail Server 1.2); Thu, 3 Feb 2000 12:35:35 +0100 X-Sender: rl@mail.overlypub.com Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 3 Feb 2000 11:33:32 -0500 To: freebsd-questions@freebsd.org From: rl@overlypub.com Subject: file in use? Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a perl program to read/process a text file. Basically it is an infinite loop that sleeps for 5 seconds. If the perl program wakes up and finds a file, it works it. My first question is: In the event of a slow ftp upload, how can I make perl wait until the file is done? As far as I can tell, ftpd does not lock the file while it is being uploaded. Second question: How can I have this script run automatically at startup? If there is a problem, I want the script to quit, so I don't want to use cron. I tried an entry in rc.local but I don't think that is right either. Are there any other options besides these two? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message