Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 1998 20:43:45 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        kf7nn@kf7nn.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: cqcam script
Message-ID:  <Pine.BSF.3.96.980510203943.2508J-100000@gdi.uoregon.edu>
In-Reply-To: <XFMail.980510215102.kf7nn@kf7nn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980510203943.2508J-100000>