On Thu, Oct 16, 2003 at 09:48:19AM -0700, Mark Crispin wrote:
>       mv imapd imapd.old;ln imapd.new imapd

Normally in UNIXes I do this as:

        ln imapd imapd.old
        ln imapd.new imapd.mv
        mv imapd.mv imapd

This way you have NO point in time, when there is no imapd.

First you make a link to keep the old version for rollback,
then you make a link from the new to an arbitrary new name,
then you 'mv' the arbitrary name to 'imapd', which normally
just drops the running versions file into oblivion,
but THAT version will live on as the first link.

Most UNIXes forbid to *write* on a busy program,
but 'mv' will *implicitely* 'rm' the old name atomically.

Stucki

Reply via email to