programmatically determine whether records exist

Fairlight fairlite at fairlite.com
Mon Feb 16 16:56:32 PST 2015


On Mon, Feb 16, 2015 at 07:11:33PM -0500, Kenneth Brody thus spoke:
> On 2/16/2015 11:56 AM, Fairlight wrote:
> >What's DDW stand for?  Dat Didn't Work?  :)
> 
> "Define 'doesn't work'."  (You must've missed my post last year when
> I got tired of all the posts that described their problem as
> "doesn't work".)

I've been pretty light on list reading over the last few years, compared to
way back, yeah.

> >What you describe is what I was told, but I couldn't even reproduce that on
> >another system when I tried to.  I was able to be in rclerk and it read and
> >passed record 1.
> [...]
> 
> So this was only on the client's system that "didn't work"?

Yup.  I couldn't replicate it myself elsewhere.

I did find, with a reread of the docs, that sysread() returns the number of
bytes read -but also undef on error-.  I was either not aware of that, or
forgot through disuse.  I stuck in some extra fault tolerance and bounds
checking, and it is kicking out Permission Denied, which sounds to me
like a locked record.  I just have it abort when it finds that.  They can
re-check the file later, or assume it's going to have something in it since
someone is in there.  Their call.

There's zero way I know of to externally get a release of an fcntl lock
from outside the process holding it, short of killing the locking process,
so those are pretty much the choices as an external program.

mark->
-- 
Audio panton, cogito singularis.


More information about the Filepro-list mailing list