Re: [htdig] htdig / Suse 6.2: very long run ?

Subject: Re: [htdig] htdig / Suse 6.2: very long run ?
From: Adam Rice (
Date: Wed Apr 26 2000 - 02:45:48 PDT

Geoff Hutchison wrote:
> I was referring more to having other copies of htdig running.
> Sometimes people have htdig running from a cron job and if a run
> takes too long, cron spawns another copy and they "collide." Not
> pretty. :-(

snprintf(buffer, buffsize, "%s.lockfile", dbbase);
lockfd = open(buffer, O_WRONLY|O_CREAT, 0600);
if (lockfd==-1)
if (flock(lockfd, LOCK_EX|LOCK_NB)==-1)

Okay, so this won't work on hardcore SysV systems that don't have
flock() emulation, but there can't be many of those left around. It's
silly to be trashing your own databases when locking is so easy to do.

Adam Rice

To unsubscribe from the htdig mailing list, send a message to
You will receive a message to confirm this.

This archive was generated by hypermail 2b28 : Wed Apr 26 2000 - 00:33:11 PDT