nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Truncated Email.


From: Andy Bradford
Subject: Re: [Nmh-workers] Truncated Email.
Date: 6 Mar 2016 13:16:03 -0700

Thus said Ken Hornstein on Sun, 06 Mar 2016 12:10:04 -0500:

> Fixing this might  be tough ... I don't know  how locking behaves when
> you truncate a file (although I see that it uses creat() to truncate a
> file, rather than ftruncate(); that seems weird to me?). So maybe it's
> not hard.

This effectively prevents inc from stomping on itself:

$ cat /usr/local/bin/inc
#!/bin/sh
REALINC=`dirname "$0"`/inc.real
INCLOCK=`mhpath +`/.inc.lock
exec setlock $INCLOCK "$REALINC" "$@"

Andy
-- 
TAI64 timestamp: 4000000056dc9027





reply via email to

[Prev in Thread] Current Thread [Next in Thread]