From owner-freebsd-questions Sun May 10 20:47:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA29944 for freebsd-questions-outgoing; Sun, 10 May 1998 20:47:34 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mutsgo.kf7nn.com (mutsgo.kf7nn.com [204.251.27.213]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA29935 for ; Sun, 10 May 1998 20:47:31 -0700 (PDT) (envelope-from kf7nn@mutsgo.kf7nn.com) Received: (from kf7nn@localhost) by mutsgo.kf7nn.com (8.8.8/8.8.7) id WAA01661; Sun, 10 May 1998 22:47:04 -0500 (CDT) (envelope-from kf7nn) Message-ID: X-Mailer: XFMail 1.1 [p0] on FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Sun, 10 May 1998 22:46:32 -0500 (CDT) From: kf7nn@kf7nn.com To: Doug White Subject: Re: cqcam script Cc: questions@FreeBSD.ORG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG so what method do you suggest to lock the file? On 11-May-98 Doug White wrote: >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 > > ---------------------------------- E-Mail: kf7nn@kf7nn.com Date: 10-May-98 Time: 22:46:35 This message was sent by XFMail ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message