From owner-freebsd-questions Sun May 10 20:43:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA29049 for freebsd-questions-outgoing; Sun, 10 May 1998 20:43:52 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA29029 for ; Sun, 10 May 1998 20:43:47 -0700 (PDT) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.8) with SMTP id UAA02571; Sun, 10 May 1998 20:43:45 -0700 (PDT) (envelope-from dwhite@gdi.uoregon.edu) Date: Sun, 10 May 1998 20:43:45 -0700 (PDT) From: Doug White Reply-To: Doug White To: kf7nn@kf7nn.com cc: questions@FreeBSD.ORG Subject: Re: cqcam script In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 10 May 1998 kf7nn@kf7nn.com wrote: > i never done this before so i may ask a few questions. > > what does locking a file mean? > > should i use "flock" to lock the file? Locking simply means to create a small flag file, like .cqcaminuse, that keeps other instances of your CGI script from trying to use the camera while another script is taking a picture. This assumes that the capture application doesn't do it's own locking. When you're done taking a picture you remove the file. Using flock() would probably be overkill. > should i use perl or a shell script? Whatever you prefer. > that is my whole extent to programming although if it was 68xx assembly > then I could do wonders...I love talking directly to hardware. If you like fiddling with hardware then you should be doing device drivers. :-) You don't have total control of the CPU with UNIX, so you can't code direct assembly since you could leave the CPU in an inconsistent state if, say, a disk access completes and interrupts your process. There is gas, which is assembly like you've never seen it. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message