On Thu, 2 May 2002, David W. Tamkin wrote:
| lockfile -0 -r0 plainfile
| which returns 0 (true) if it could lock the file - hence the file didn't
| already exist - and non-zero if it could not.
I think just -r0 is enough, since it says "don't retry." There's nothing to
wait for if lockfile doesn't retry.
Unfortunately, however, that does the job only if the file exists. If the
file *doesn't* exist, lockfile creates it, and then I need an additional fork
for rm to remove it.
(Unexpert interupt) if you lock something you must unlock too,
isn't? The lockfile timeout on the order of secunds!
Can you lockfile -l0 ?
procmail mailing list