* Andre Oppermann <[EMAIL PROTECTED]> [010206 12:58] wrote:
> Alfred Perlstein wrote:
> > 
> > Basically, you want a fsync right before the IPC.  This should
> > bring the metadata up to date with what's in-core and you should
> > then be safe when you reply with your 250 accepted message.
> 
> Like this (from qmail-queue):
> 
> ...
>  if (fsync(intdfd) == -1) die_write();
> 
>  if (link(intdfn,todofn) == -1) die(66);
> 
>  triggerpull();
>  die(0);
> }
> 
> Actually for initial queueing it doesn't even unlink() but leaves
> it to the next program. Can't be more safe, can it?

Only if you don't need the link() to exist after a crash.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to